]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1714070 Patron parent/guardian field
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
808                 oils_obj:fieldmapper="vandelay::session_tracker" 
809                 oils_persist:tablename="vandelay.session_tracker" 
810                 reporter:label="Vandelay Session Tracker">
811                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
813                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
815                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
816                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
817                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
818                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
819                                          queue or an auth queue and there's no IDL class for vandelay.queue .
820                                          parent table.
821                         -->
822                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
823                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
824                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
825                         <field reporter:label="State" name="state" reporter:datatype="text"/>
826                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
827                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
828                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
829                 </fields>
830                 <links>
831                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
832                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <!-- created by the API -->
837                                 <retrieve global_required="true"
838                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
839                                 <update global_required="true"
840                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
841                                         <context link="workstation" field="owning_lib"/>
842                                 </update>
843                                 <delete 
844                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </delete>
847                         </actions>
848                 </permacrud>
849         </class>
850
851         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
853                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
854                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
855                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
856                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
857                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
858                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
859                 </fields>
860                 <links>
861                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
863                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
864                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
865                 </links>
866         </class>
867
868     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
869         <fields oils_persist:primary="name">
870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
871             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
872             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
873             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
874         </fields>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
878                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
879                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881             </actions>
882         </permacrud>
883     </class>
884
885     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
886         <fields oils_persist:primary="id">
887             <field reporter:label="ID" name="id" reporter:datatype="id"/>
888             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
890             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
891             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
892         </fields>
893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
894             <actions>
895                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
896                 <retrieve/>
897                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
898                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899             </actions>
900         </permacrud>
901     </class>
902
903         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
904                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
906                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
907                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
908                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
909                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
910                 </fields>
911                 <links>
912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
913                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
918                 <retrieve/>
919                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
920                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
928                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
929                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
930         </fields>
931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
932             <actions>
933                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
934                 <retrieve/>
935                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
936                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
937             </actions>
938         </permacrud>
939         </class>
940
941         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
942                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
943                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
944                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
945                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
946                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
947                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
948                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
950                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
951                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
952                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
953                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
954         </fields>
955                 <links>
956                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
957                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
962                 <retrieve/>
963                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
964                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
970                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
971                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
972                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
973                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
974                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
975                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
977                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
978                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
979                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
980                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
981         </fields>
982                 <links>
983                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
989                 <retrieve/>
990                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
991                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
992             </actions>
993         </permacrud>
994         </class>
995
996         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
997                 <fields oils_persist:primary="name">
998                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
999                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1001                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1002                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1003                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1004                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1005                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1006                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1007                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1008                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1009                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1010                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1011                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1012                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1013                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1014                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1015                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1016                 </fields>
1017                 <links>
1018                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1019                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1020                 </links>
1021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1022             <actions>
1023                 <create permission="ADMIN_SVF" global_required="true"/>
1024                 <retrieve/>
1025                 <update permission="ADMIN_SVF" global_required="true"/>
1026                 <delete permission="ADMIN_SVF" global_required="true"/>
1027             </actions>
1028         </permacrud>
1029         </class>
1030
1031         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
1032                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1034                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1035                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1036             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1037                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1038                 </fields>
1039                 <links/>
1040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1041             <actions>
1042                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1043                 <retrieve/>
1044                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1045                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046             </actions>
1047         </permacrud>
1048         </class>
1049
1050         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1051                 <fields oils_persist:primary="coded_value">
1052                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1053                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1054                 </fields>
1055                 <links>
1056                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1057                 </links>
1058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1059             <actions>
1060                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1061                 <retrieve/>
1062                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1063                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1064             </actions>
1065         </permacrud>
1066         </class>
1067
1068         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1070                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1071                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1072                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1073                 </fields>
1074                 <links>
1075                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1076                 </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <retrieve/>
1080             </actions>
1081         </permacrud>
1082         </class>
1083
1084
1085         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1087                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1088                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1089                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1090                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1091                 </fields>
1092                 <links>
1093                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1094                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1095                 </links>
1096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1097             <actions>
1098                 <retrieve/>
1099             </actions>
1100         </permacrud>
1101         </class>
1102
1103
1104         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1105                 <fields oils_persist:primary="source">
1106                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1107                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1108                 </fields>
1109                 <links>
1110                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1111                 </links>
1112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1113             <actions>
1114                 <retrieve/>
1115             </actions>
1116         </permacrud>
1117         </class>
1118
1119         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1120                 <fields>
1121                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1122                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1123                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1124                 </fields>
1125                 <links>
1126                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1127                 </links>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <retrieve/>
1131             </actions>
1132         </permacrud>
1133         </class>
1134
1135         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1136                 <fields oils_persist:primary="id">
1137                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1138                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1139                 </fields>
1140                 <links>
1141                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1142                 </links>
1143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1144             <actions>
1145                 <retrieve/>
1146             </actions>
1147         </permacrud>
1148         </class>
1149
1150         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1151                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1152                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1153                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1154                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1155                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1156                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1157                 </fields>
1158                 <links>
1159                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1160                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1161                 </links>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1167                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1175                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1176                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1177                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1178                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1179                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1180                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1181             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1182             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1183             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1184                 </fields>
1185                 <links>
1186                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1187                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1188                 </links>
1189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1190             <actions>
1191                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1192                 <retrieve/>
1193                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1194                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1195             </actions>
1196         </permacrud>
1197         </class>
1198
1199         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1201                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1202                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1203                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1204                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1205                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1206                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1207                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1208                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1209                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1210                 </fields>
1211                 <links>
1212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1215             <actions>
1216                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1217                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1218                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220             </actions>
1221         </permacrud>
1222         </class>
1223
1224     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1225         <fields oils_persist:primary="name">
1226             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1227             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1228             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1229             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1230             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1231             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1232             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1233             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1234             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1235             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1236         </fields>
1237         <links>
1238             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1239             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1240         </links>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1246                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249     </class>
1250
1251     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1252         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1253             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1254             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1255             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1256             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1257             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1258             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1259             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1260         </fields>
1261         <links>
1262             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1263         </links>
1264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1265             <actions>
1266                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1267                 <retrieve/>
1268                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1269                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270             </actions>
1271         </permacrud>
1272     </class>
1273
1274     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1275                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1276                         oils_persist:tablename="config.z3950_index_field_map" 
1277                         reporter:label="Z39.50 Index Field Map">
1278         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1279             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1280             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1281             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1282             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1283             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1284             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1285         </fields>
1286         <links>
1287             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1288             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1289             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1290         </links>
1291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292             <actions>
1293                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1294                 <retrieve/>
1295                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1296                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297             </actions>
1298         </permacrud>
1299     </class>
1300
1301
1302         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1303                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1304                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1305                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1306                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1307                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1308                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1309                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1310                 </fields>
1311                 <links>
1312             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1313             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1314                 </links>
1315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1316                         <actions>
1317                                 <retrieve/>
1318                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1319                         </actions>
1320                 </permacrud>
1321         </class>
1322
1323         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1324                 <fields oils_persist:primary="key">
1325                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1326                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1328                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1329                 </fields>
1330                 <links/>
1331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332                         <actions>
1333                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1334                                 <retrieve/>
1335                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1336                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1337                         </actions>
1338                 </permacrud>
1339         </class>
1340
1341         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1342                 <fields oils_persist:primary="module">
1343                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1344                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1345                 </fields>
1346                 <links/>
1347         </class>
1348
1349         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1350                 <fields oils_persist:primary="module">
1351                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1352                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356                         <actions>
1357                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1358                                 <retrieve/>
1359                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1360                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1361                         </actions>
1362                 </permacrud>
1363         </class>
1364
1365         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1366                 <fields oils_persist:primary="module">
1367                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372                         <actions>
1373                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1374                                 <retrieve/>
1375                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1376                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1377                         </actions>
1378                 </permacrud>
1379         </class>
1380
1381         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1382                 <fields oils_persist:primary="module">
1383                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1384                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388                         <actions>
1389                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1390                                 <retrieve/>
1391                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1392                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1393                         </actions>
1394                 </permacrud>
1395         </class>
1396
1397         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1399                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1401                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1402                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1403                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1404                 </fields>
1405                 <links>
1406                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1407                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1408                 </links>
1409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1410                         <actions>
1411                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1412                     <context link="event_def" field="owner"/>
1413                 </create>
1414                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </retrieve>
1417                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </update>
1420                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </delete>
1423                         </actions>
1424                 </permacrud>
1425         </class>
1426
1427         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1429                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1430                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1431                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1432                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1433                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1434                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1435                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1436                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1437                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1438                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1439                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1440                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1441                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1442                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1443                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1444                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1445                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1446                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1447                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1448                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1449                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1450                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1451                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1452                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1453                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1454                 </fields>
1455                 <links>
1456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1458                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1459                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1460                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1461                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1462                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1463                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1464                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1465                 </links>
1466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1467                         <actions>
1468                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1469                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1470                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                         </actions>
1473                 </permacrud>
1474         </class>
1475
1476         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1477                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1478                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1479                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1480                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1481                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1482                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1483                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1487                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1488                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1489                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1490                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1491                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1492                 </fields>
1493                 <links>
1494                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1495                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1496                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1497                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                 </links>
1499         </class>
1500
1501         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1502                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1503                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1504                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1505                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1506                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1507                 </fields>
1508                 <links>
1509                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1510                 </links>
1511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512                         <actions>
1513                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1514                     <context link="event_def" field="owner"/>
1515                 </create>
1516                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </retrieve>
1519                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </update>
1522                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </delete>
1525                         </actions>
1526                 </permacrud>
1527         </class>
1528
1529         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1530                 <oils_persist:source_definition><![CDATA[
1531                 SELECT  atevdef.hook,
1532                         atevdef.name,
1533                         atevdef.reactor,
1534                         atev.id,
1535                         atev.event_def,
1536                         atev.add_time,
1537                         atev.run_time,
1538                         atev.start_time,
1539                         atev.update_time,
1540                         atev.complete_time,
1541                         atev.update_process,
1542                         atev.state,
1543                         atev.user_data,
1544                         atev.template_output,
1545                         atev.error_output,
1546                         atev.async_output,
1547                         targ_circ.id AS target_circ,
1548                         targ_ahr.id AS target_hold,
1549                         COALESCE(
1550                                 targ_circ.circ_lib,
1551                                 targ_ahr.pickup_lib
1552                         ) AS perm_lib
1553                 FROM action_trigger.event atev
1554                 JOIN action_trigger.event_definition atevdef ON
1555                         (atevdef.id = atev.event_def)
1556                 JOIN action_trigger.hook ath ON
1557                         (ath.key = atevdef.hook)
1558                 LEFT JOIN action.circulation targ_circ ON
1559                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1560                 LEFT JOIN action.hold_request targ_ahr ON
1561                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1562                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1563                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1564                                 'circ.staff.max_visible_event_age',
1565                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1566                         ) UNION
1567                         SELECT '1000 YEARS'::INTERVAL AS value
1568                 ) ous)
1569                 ]]></oils_persist:source_definition>
1570                 <fields oils_persist:primary="id">
1571                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1572                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1573                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1574                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1575                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1576                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1577                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1578                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1582                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1583                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1584                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1585                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1586                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1587                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1588                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1589                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1590                 </fields>
1591                 <links>
1592                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1593                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1594                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1595                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1597                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1598                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1599                 </links>
1600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601                         <actions>
1602                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1603                         </actions>
1604                 </permacrud>
1605         </class>
1606
1607         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1608                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1609                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1610                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1611                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1612                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1614                 </fields>
1615                 <links>
1616                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1617                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1618                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1619                 </links>
1620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1621                         <actions>
1622                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1623                         </actions>
1624                 </permacrud>
1625         </class>
1626
1627         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1628                 <fields oils_persist:primary="code">
1629                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1630                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1632                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1634                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1635                 </fields>
1636                 <links/>
1637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1638             <actions>
1639                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1640                 <retrieve/>
1641                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1642                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1643             </actions>
1644         </permacrud>
1645         </class>
1646
1647         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1648                 <fields oils_persist:primary="code">
1649                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1650                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1651                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1652                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1653                 </fields>
1654                 <links/>
1655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1656             <actions>
1657                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1658                 <retrieve/>
1659                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1660                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1661             </actions>
1662         </permacrud>
1663         </class>
1664
1665         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1666                 <fields oils_persist:primary="code">
1667                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1668                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1669                 </fields>
1670                 <links/>
1671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1672             <actions>
1673                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1674                 <retrieve/>
1675                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1676                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1677             </actions>
1678         </permacrud>
1679         </class>
1680
1681         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1682                 <fields oils_persist:primary="code">
1683                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1684                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1685                 </fields>
1686                 <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1692                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695         </class>
1696
1697         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1698                 <fields oils_persist:primary="code">
1699                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1700                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1701                 </fields>
1702                 <links/>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1706                 <retrieve/>
1707                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1708                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1715                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1731                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1733                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1734                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1735                 </fields>
1736         <links>
1737             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1738             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1739             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1740         </links>
1741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1742             <actions>
1743                 <create permission="UPDATE_COPY">
1744                     <context link="target_copy" field="circ_lib"/>
1745                 </create>
1746                 <retrieve/>
1747                 <update permission="UPDATE_COPY">
1748                     <context link="target_copy" field="circ_lib"/>
1749                 </update>
1750                 <delete permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </delete>
1753             </actions>
1754         </permacrud>
1755         </class>
1756
1757         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1758                 <fields oils_persist:primary="code">
1759                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1760                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1761                 </fields>
1762                 <links/>
1763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1764             <actions>
1765                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1766                 <retrieve/>
1767                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1768                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1769             </actions>
1770         </permacrud>
1771         </class>
1772
1773         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1774                 <fields oils_persist:primary="code">
1775                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1777                 </fields>
1778                 <links/>
1779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1780             <actions>
1781                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1782                 <retrieve/>
1783                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1784                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1785             </actions>
1786         </permacrud>
1787         </class>
1788
1789         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1790                 <fields oils_persist:primary="code">
1791                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1792                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1793                 </fields>
1794                 <links/>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1798                 <retrieve/>
1799                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1800                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1807             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1808             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1809             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1810             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1811             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1812             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1813             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1814             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1815             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1816             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1817             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1818             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1823             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1824         </fields>
1825         <links/>
1826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827             <actions>
1828                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1829                 <retrieve/>
1830                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1831                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832             </actions>
1833         </permacrud>
1834     </class>
1835
1836     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1837         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1838             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1839             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1840             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1841             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1842             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1843             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1844             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1845             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1846             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1847             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1848             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1849             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1850             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1851             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1852             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1853             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1854             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1855             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1856             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1857         </fields>
1858         <links/>
1859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1860             <actions>
1861                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1862                 <retrieve/>
1863                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1864                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865             </actions>
1866         </permacrud>
1867     </class>
1868
1869     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1870         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1871             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1872             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1873             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1874             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1875             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1876         </fields>
1877         <links>
1878             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1879             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1880             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1881         </links>
1882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1883             <actions>
1884                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1885                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1886                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888             </actions>
1889         </permacrud>
1890     </class>
1891
1892         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1894                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1895                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1896                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1897                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1898                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1899                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1903                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1904                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1905                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1906                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1910             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1911                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1912                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1913                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1914                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1915                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1916                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1917                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1918                 </fields>
1919                 <links>
1920                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1921                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1926                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1927                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1928                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1929                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1930                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1931                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1932                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1933             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1938                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1939                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941             </actions>
1942         </permacrud>
1943         </class>
1944
1945         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1946                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1947                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1948                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1949                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1950                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1951                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1952                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1953                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1954                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1955                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1956                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1957                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1958                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1962             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1963                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1964                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1965             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1966                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1967                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1968                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1969                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1970             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1971             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1972             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1973                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1974                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1975                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1985                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1986                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1987                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1988                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1989                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1990                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1991                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1992                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1993             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1994                 </links>
1995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996             <actions>
1997                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1998                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1999                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004
2005     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
2006         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2007             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2008             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2009             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2010         </fields>
2011         <links/>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2015                 <retrieve/>
2016                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2017                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018             </actions>
2019         </permacrud>
2020     </class>
2021
2022     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
2023         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2024             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2025             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2026             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2027             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2028             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2029             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2030             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2031         </fields>
2032         <links>
2033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2034         </links>
2035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2036             <actions>
2037                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2038                 <retrieve/>
2039                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2040                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041             </actions>
2042         </permacrud>
2043     </class>
2044
2045     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2046         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2047             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2048             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2049             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2050             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2051             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2052         </fields>
2053         <links>
2054             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2055             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2056         </links>
2057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2058             <actions>
2059                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2060                     <context link="matchpoint" field="org_unit"/>
2061                 </create>
2062                 <retrieve/>
2063                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2064                     <context link="matchpoint" field="org_unit"/>
2065                 </update>
2066                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </delete>
2069             </actions>
2070         </permacrud>
2071     </class>
2072
2073     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2074         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2075             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2076             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2077             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2078         </fields>
2079         <links>
2080             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2081             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2082         </links>
2083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2084             <actions>
2085                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2086                     <context link="limit_set" field="owning_lib"/>
2087                 </create>
2088                 <retrieve/>
2089                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2090                     <context link="limit_set" field="owning_lib"/>
2091                 </update>
2092                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </delete>
2095             </actions>
2096         </permacrud>
2097     </class>
2098     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2099         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2100             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2101             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2102             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2103         </fields>
2104         <links>
2105             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2106             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2107         </links>
2108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2109             <actions>
2110                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2111                     <context link="limit_set" field="owning_lib"/>
2112                 </create>
2113                 <retrieve/>
2114                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2115                     <context link="limit_set" field="owning_lib"/>
2116                 </update>
2117                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </delete>
2120             </actions>
2121         </permacrud>
2122     </class>
2123
2124     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2125         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2126             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2127             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2128             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2129             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2130         </fields>
2131         <links>
2132             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2133             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2134         </links>
2135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136             <actions>
2137                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2138                     <context link="limit_set" field="owning_lib"/>
2139                 </create>
2140                 <retrieve/>
2141                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2142                     <context link="limit_set" field="owning_lib"/>
2143                 </update>
2144                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </delete>
2147             </actions>
2148         </permacrud>
2149     </class>
2150
2151         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2153                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2154                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2155                 </fields>
2156                 <links/>
2157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158             <actions>
2159                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2160                 <retrieve/>
2161                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2162                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163             </actions>
2164         </permacrud>
2165         </class>
2166
2167         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2168                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2169                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2172                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2173                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2174                 </fields>
2175                 <links>
2176                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2177                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2178                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2179                 </links>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="ADMIN_SURVEY">
2183                     <context link="survey" field="owner"/>
2184                 </create>
2185                 <retrieve/>
2186                 <update permission="ADMIN_SURVEY">
2187                     <context link="survey" field="owner"/>
2188                 </update>
2189                 <delete permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </delete>
2192             </actions>
2193         </permacrud>
2194         </class>
2195         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="">
2197                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2198                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2199                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2200                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2201                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2202                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2205                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2206                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2207                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2208                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2209                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2210                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2211                 </fields>
2212                 <links>
2213                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions>
2217                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2218                                         <context link="usr" field="home_ou" />
2219                                 </retrieve>
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="">
2225                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2226                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2227                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2228                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2230                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2233                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2234                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2235                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2236                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2237                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2238                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2239                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2240                 </fields>
2241                 <links>
2242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2248                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2249                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2251                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2253                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2260                 </links>
2261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262                         <actions> <!-- created magically, so no create action -->
2263                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2264                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2265                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2266                         </actions>
2267                 </permacrud>
2268         </class>
2269         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2271                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2272                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2274                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2275                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2276                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2277                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2278                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2279                 </fields>
2280                 <links>
2281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2282                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2283                 </links>
2284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2285                         <actions> <!-- created magically, so no create action -->
2286                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2287                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2288                         </actions>
2289                 </permacrud>
2290         </class>
2291         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2293                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2294                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2296                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2297                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2298                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2299                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2300                 </fields>
2301                 <links>
2302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                 </links>
2305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2306             <actions>
2307                 <create permission="UPDATE_USER" context_field="owner">
2308                     <context link="usr" field="home_ou"/>
2309                 </create>
2310                                 <!-- note: public notes are still accessible via API -->
2311                 <retrieve permission="UPDATE_USER">
2312                     <context link="usr" field="home_ou"/>
2313                                 </retrieve>
2314                 <update permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </update>
2317                 <delete permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </delete>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2325                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2326                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2327                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2328                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2329                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2330                 </fields>
2331                 <links>
2332                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2333                 </links>
2334         </class>
2335         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2337                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2338                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2339                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2340                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2341                 </fields>
2342                 <links>
2343                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2345                 </links>
2346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2347                         <actions>
2348                                 <retrieve permission="VIEW_USER">
2349                                         <context link="usr" field="home_ou" />
2350                                 </retrieve>
2351                         </actions>
2352                 </permacrud>
2353         </class>
2354         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2356                         <field name="field" reporter:datatype="link"/>
2357                         <field name="id" reporter:datatype="id" />
2358                         <field name="source" reporter:datatype="link"/>
2359                         <field name="value" reporter:datatype="text"/>
2360                 </fields>
2361                 <links>
2362                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2363                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2364                 </links>
2365         </class>
2366         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2367                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2368                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2369                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2370                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2371                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2372                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2373                 </fields>
2374                 <links>
2375                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2376                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2377                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2378                 </links>
2379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2380                         <actions>
2381                                 <retrieve/>
2382                         </actions>
2383                 </permacrud>
2384         </class>
2385         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2387                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2388                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2389                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2390                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2391                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2392                 </fields>
2393                 <links>
2394                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2395                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2397                 </links>
2398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2399                         <actions>
2400                                 <retrieve/>
2401                         </actions>
2402                 </permacrud>
2403         </class>
2404         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2405                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2406                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2407                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2408                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2410                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2411                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2412                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2413                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2414                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2415                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2416                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2417                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2418                 </fields>
2419                 <links>
2420                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2421                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2422                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2423                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2424                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2425                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2426                 </links>
2427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2428             <actions>
2429                 <create permission="TRANSIT_COPY" context_field="owner">
2430                     <context link="target_copy" field="circ_lib"/>
2431                 </create>
2432                 <retrieve/>
2433                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2434                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2435             </actions>
2436         </permacrud>
2437         </class>
2438         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2439                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2440                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2441                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2443                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2444                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2445                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2446                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2447                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2448                 </fields>
2449                 <links>
2450                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2451                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2452                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2454                 </links>
2455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2456             <actions>
2457                 <create permission="ADMIN_SURVEY">
2458                     <context link="survey" field="owner"/>
2459                 </create>
2460                 <retrieve permission="VIEW_USER">
2461                     <context link="usr" field="home_ou"/>
2462                 </retrieve>
2463                 <update permission="ADMIN_SURVEY">
2464                     <context link="survey" field="owner"/>
2465                 </update>
2466                 <delete permission="ADMIN_SURVEY">
2467                     <context link="survey" field="owner"/>
2468                 </delete>
2469             </actions>
2470         </permacrud>
2471         </class>
2472         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2473                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2474                         <field name="bucket" />
2475                         <field name="id" reporter:datatype="id" />
2476                         <field name="target_copy" reporter:datatype="link"/>
2477                         <field name="create_time" reporter:datatype="timestamp" />
2478                         <field name="pos" reporter:datatype="int" />
2479                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2480                 </fields>
2481                 <links>
2482                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2483                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2484             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2485                 </links>
2486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2487                         <actions>
2488                                 <retrieve permission="ADMIN_COPY_BUCKET">
2489                     <context link="bucket" owning_lib="owning_lib"/>
2490                 </retrieve>
2491             </actions>
2492         </permacrud>
2493         </class>
2494         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2495                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2496                         <field name="id" reporter:datatype="id" />
2497                         <field name="item" reporter:datatype="link"/>
2498                         <field name="note" reporter:datatype="text" />
2499                 </fields>
2500                 <links>
2501                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2502                 </links>
2503         </class>
2504
2505         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2507                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2509                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2510                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2511                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2512                 </fields>
2513                 <links>
2514                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2515                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2516                 </links>
2517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2518                         <actions>
2519                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2520                                 <retrieve/>
2521                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2522                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2523                         </actions>
2524                 </permacrud>
2525         </class>
2526
2527         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2529                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2530                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2531                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2532                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2533                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2534                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2535                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2536                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2537                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2538                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2539                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2540                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2541                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2542                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2543                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2544                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2545                 </fields>
2546                 <links>
2547                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2548                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2549                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2550                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2551                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2552                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2553                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2554                 </links>
2555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2556                         <actions>
2557                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2558                                 <retrieve/>
2559                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2560                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2561                         </actions>
2562                 </permacrud>
2563         </class>
2564
2565         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2567                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2568                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2569                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2570                 </fields>
2571                 <links>
2572                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2573                 </links>
2574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2575                         <actions>
2576                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2577                                 <retrieve/>
2578                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2579                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2580                         </actions>
2581                 </permacrud>
2582         </class>
2583
2584         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2585                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2586                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2587                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2588                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2589                 </fields>
2590                 <links>
2591                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2592                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2593                 </links>
2594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2595                         <actions>
2596                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2597                                 <retrieve/>
2598                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2599                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2600                         </actions>
2601                 </permacrud>
2602         </class>
2603
2604         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2605                 <fields oils_persist:primary="code">
2606                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2607                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2609                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2610                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2611                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2612                 </fields>
2613                 <links>
2614                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2615                 </links>
2616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2617                         <actions>
2618                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2619                                 <retrieve/>
2620                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2621                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2622                         </actions>
2623                 </permacrud>
2624         </class>
2625
2626         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2627                 <fields oils_persist:primary="code">
2628                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2630                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2631                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2632                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2633                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2634                 </fields>
2635                 <links>
2636                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2637                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2638                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2639                 </links>
2640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2641                         <actions>
2642                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2643                                 <retrieve/>
2644                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2645                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2646                         </actions>
2647                 </permacrud>
2648         </class>
2649
2650     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2651         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2652             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2653             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2654             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2655         </fields>
2656         <links>
2657             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2658             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2659         </links>
2660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2661             <actions>
2662                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2663                 <retrieve/>
2664                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2665                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2666             </actions>
2667         </permacrud>
2668     </class>
2669
2670         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2672                         <field name="active" reporter:datatype="bool"/>
2673                         <field name="create_date" reporter:datatype="timestamp"/>
2674                         <field name="creator" />
2675                         <field name="deleted" reporter:datatype="bool"/>
2676                         <field name="edit_date" reporter:datatype="timestamp"/>
2677                         <field name="editor" />
2678                         <field name="id" reporter:datatype="id" />
2679                         <field name="last_xact_id" />
2680                         <field name="marc" />
2681                         <field name="source" />
2682                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2683                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2684                         <field name="heading" />
2685                         <field name="simple_heading" />
2686                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2689                 </fields>
2690                 <links>
2691                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2692                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2693                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2695                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2696                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2697                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2698                 </links>
2699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2700                         <actions>
2701                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2702                                 <retrieve/>
2703                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2704                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2705                         </actions>
2706                 </permacrud>
2707         </class>
2708         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2709                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2710                         <field name="char_encoding" />
2711                         <field name="id" />
2712                         <field name="record" />
2713                         <field name="record_status" />
2714                         <field name="thesaurus" />
2715                 </fields>
2716                 <links>
2717                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2718                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2719                 </links>
2720         </class>
2721         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2722                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2723                         <field name="id" reporter:datatype="id" />
2724                         <field name="bib" reporter:datatype="link" />
2725                         <field name="authority" reporter:datatype="link" />
2726                 </fields>
2727                 <links>
2728                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2729                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2730                 </links>
2731         </class>
2732         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2733                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2734                         <field name="id" reporter:datatype="id" />
2735                         <field name="record" reporter:datatype="link" />
2736                         <field name="atag" reporter:datatype="link" />
2737                         <field name="value" reporter:datatype="text" />
2738                 </fields>
2739                 <links>
2740                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2741                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2742                 </links>
2743         </class>
2744
2745         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2746                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2749                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2750                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2751                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2752                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2753                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2754                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2755                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2756                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2757                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2758                 </fields>
2759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2760                         <actions>
2761                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2762                                 <retrieve/>
2763                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2764                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2765                         </actions>
2766                 </permacrud>
2767         </class>
2768
2769         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2770                 <fields oils_persist:primary="code" oils_persist:sequence="">
2771                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2772                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2773                 </fields>
2774                 <links/>
2775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2776             <actions>
2777                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2778                 <retrieve/>
2779                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2780                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2781             </actions>
2782         </permacrud>
2783         </class>
2784         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2785                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2786                         <field name="accepting_usr" />
2787                         <field name="amount" reporter:datatype="money" />
2788                         <field name="amount_collected" reporter:datatype="money" />
2789                         <field name="approval_code" reporter:datatype="text"/>
2790                         <field name="cash_drawer" reporter:datatype="link"/>
2791                         <field name="cc_number" reporter:datatype="text"/>
2792                         <field name="cc_order_number" reporter:datatype="text"/>
2793                         <field name="cc_processor" reporter:datatype="text"/>
2794                         <field name="id" reporter:datatype="id" />
2795                         <field name="note" reporter:datatype="text"/>
2796                         <field name="payment_ts" reporter:datatype="timestamp"/>
2797                         <field name="xact" reporter:datatype="link"/>
2798                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2799                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2800                 </fields>
2801                 <links>
2802                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2803                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2804                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2805                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2806                 </links>
2807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2808             <actions>
2809                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2810                     <context link="xact" jump="usr" field="home_ou"/>
2811                 </retrieve>
2812                         </actions>
2813                 </permacrud>
2814         </class>
2815         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2816                 <fields oils_persist:primary="name">
2817                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2818                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2819                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2820                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2821                 </fields>
2822                 <links/>
2823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2824             <actions>
2825                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2826                 <retrieve/>
2827                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2828                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2829             </actions>
2830         </permacrud>
2831         </class>
2832
2833         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2834                 <fields oils_persist:primary="alias">
2835                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2836                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2837                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2838                 </fields>
2839                 <links>
2840                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2841                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2842                 </links>
2843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2844             <actions>
2845                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2846                 <retrieve/>
2847                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2848                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2849             </actions>
2850         </permacrud>
2851         </class>
2852
2853         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2854                 <fields oils_persist:primary="name">
2855                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2856                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2857                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2858                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2859                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2860                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2861                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2862                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2863                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2864                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2865                 </fields>
2866                 <links>
2867                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2868                 </links>
2869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2870             <actions>
2871                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2872                 <retrieve/>
2873                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2874                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2875             </actions>
2876         </permacrud>
2877         </class>
2878
2879         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2880                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2881                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2882                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2883                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2884                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2885                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2886                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2887                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2888                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2889                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2890                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2891                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2892                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2893                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2894                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2895                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2896                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2897                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2898                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2899                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2901                 </fields>
2902                 <links>
2903                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2904                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2905                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2906                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2907                 </links>
2908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2909             <actions>
2910                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2911                 <retrieve/>
2912                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2913                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2914             </actions>
2915         </permacrud>
2916         </class>
2917
2918         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2919                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2920                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2921                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2922                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2923                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2924                 </fields>
2925                 <links>
2926                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2927                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2928                 </links>
2929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2930             <actions>
2931                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2932                 <retrieve/>
2933                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2934                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2935             </actions>
2936         </permacrud>
2937         </class>
2938
2939         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2940                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2941                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2942                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2943                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2944                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2945                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2946                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2947                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2948                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2949                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2950                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2951                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2952                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2953                 </fields>
2954                 <links>
2955                 </links>
2956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2957                         <actions>
2958                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2959                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2960                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2961                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2962                         </actions>
2963                 </permacrud>
2964         </class>
2965         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2966                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2967                         <field name="id" reporter:datatype="id" />
2968                         <field name="name" reporter:datatype="text"/>
2969                         <field name="xpath" reporter:datatype="text"/>
2970                         <field name="format" reporter:datatype="link"/>
2971                         <field name="first_word" reporter:datatype="bool" />
2972                 </fields>
2973                 <links/>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2977                 <retrieve/>
2978                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2979                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2980             </actions>
2981         </permacrud>
2982         </class>
2983         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2984                 <fields oils_persist:primary="code" oils_persist:sequence="">
2985                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2986                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2987                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2988                 </fields>
2989                 <links/>
2990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2991             <actions>
2992                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2993                 <retrieve/>
2994                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2995                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2996             </actions>
2997         </permacrud>
2998         </class>
2999         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
3000                 <fields oils_persist:primary="code" oils_persist:sequence="">
3001                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3002                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3003                 </fields>
3004                 <links/>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3008                 <retrieve/>
3009                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3010                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
3015         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3016             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3017             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3018             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3019             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3020         </fields>
3021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3022             <actions>
3023                 <retrieve/>
3024             </actions>
3025         </permacrud>
3026     </class>
3027         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
3028                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3029                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3030                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3031                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3032                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3033                 </fields>
3034                 <links>
3035                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3036                 </links>
3037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3038             <actions>
3039                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3040                 <retrieve/>
3041                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3042                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3043             </actions>
3044         </permacrud>
3045         </class>
3046         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3048                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3049                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3050                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3051                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3052                 </fields>
3053                 <links>
3054                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3055                 </links>
3056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057             <actions>
3058                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3059                 <retrieve/>
3060                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3061                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3062             </actions>
3063         </permacrud>
3064         </class>
3065         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3067                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3068                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3070                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3071                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3072                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3073                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3074                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3075                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3076                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3077                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3081                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3082                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3083                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3084                 </fields>
3085                 <links>
3086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3087                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3088                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3089                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3090                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3091                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3092                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3093                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3094                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3095                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3096                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3097                 </links>
3098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099             <actions>
3100                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3101                 <retrieve/>
3102                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3103                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3109                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3110                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3111                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3112                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3113                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3114                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3119                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3120         </links>
3121         </class>
3122         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
3123                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3125                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3126                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3127                 </fields>
3128                 <links>
3129                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3130                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3131                 </links>
3132         </class>
3133         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3135                         <field name="id" reporter:datatype="id" />
3136                         <field name="value" oils_persist:i18n="true" />
3137                 </fields>
3138                 <links/>
3139         </class>
3140         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
3141                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3142                         <field name="balance_owed" reporter:datatype="money" />
3143                         <field name="total_owed" reporter:datatype="money" />
3144                         <field name="total_paid" reporter:datatype="money" />
3145                         <field name="usr" reporter:datatype="link"/>
3146                 </fields>
3147                 <links>
3148                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3149         </links>
3150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3151             <actions>
3152                 <retrieve permission="VIEW_USER">
3153                     <context link="usr" field="home_ou"/>
3154                 </retrieve>
3155             </actions>
3156         </permacrud>
3157         </class>
3158         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3160                         <field name="collector" />
3161                         <field name="enter_time" reporter:datatype="timestamp"/>
3162                         <field name="id" reporter:datatype="id" />
3163                         <field name="location" reporter:datatype="link"/>
3164                         <field name="usr" reporter:datatype="link"/>
3165                 </fields>
3166                 <links>
3167                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3168                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3169                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3170                 </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="money.collections_tracker.create" context_field="location"/>
3174                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3175                 <delete permission="money.collections_tracker.create" context_field="location"/>
3176             </actions>
3177         </permacrud>
3178         </class>
3179         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
3180                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3181                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3182                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3183                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3184                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3185                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3186                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3187                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3188                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3189                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3190                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3191                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3192                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3193                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3194                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3195                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3196                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3197                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3198                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3199                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3203                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3204                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3205                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3207                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3209                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3210                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3219                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3220                 </fields>
3221                 <links>
3222                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3223                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3224                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3225                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3226                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3227                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3228                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3229                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3230                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3231                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3232                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3233                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3234                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3235                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3236                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3237                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3238                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3239                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3240                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3241                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3242                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3243                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3244                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3245                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3246                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3247                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3248                 </links>
3249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3252                 <retrieve/>
3253                 <update permission="UPDATE_MARC" global_required="true"/>
3254                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3255                 <delete permission="DELETE_RECORD" global_required="true"/>
3256             </actions>
3257         </permacrud>
3258         </class>
3259         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
3260                 <fields oils_persist:primary="id">
3261                         <field name="dow_0_close" />
3262                         <field name="dow_0_open" />
3263                         <field name="dow_1_close" />
3264                         <field name="dow_1_open" />
3265                         <field name="dow_2_close" />
3266                         <field name="dow_2_open" />
3267                         <field name="dow_3_close" />
3268                         <field name="dow_3_open" />
3269                         <field name="dow_4_close" />
3270                         <field name="dow_4_open" />
3271                         <field name="dow_5_close" />
3272                         <field name="dow_5_open" />
3273                         <field name="dow_6_close" />
3274                         <field name="dow_6_open" />
3275                         <field name="id" reporter:datatype="id" />
3276                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3277                 </fields>
3278                 <links>
3279                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3280                 </links>
3281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282             <actions>
3283                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3284                 <retrieve/>
3285                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3286                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3287             </actions>
3288         </permacrud>
3289         </class>
3290         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3292                         <field name="id" reporter:datatype="id" />
3293                         <field name="record" reporter:datatype="link"/>
3294                         <field name="label" reporter:datatype="text"/>
3295                         <field name="label_sortkey" reporter:datatype="text"/>
3296                         <field name="deleted" reporter:datatype="bool"/>
3297                 </fields>
3298                 <links>
3299                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3300                 </links>
3301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3302             <actions>
3303                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3304                 <retrieve/>
3305                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3306                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3307             </actions>
3308         </permacrud>
3309         </class>
3310         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
3311                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3312                         <field name="id" reporter:datatype="id" />
3313                         <field name="target_copy" reporter:datatype="link" />
3314                         <field name="part" reporter:datatype="link"/>
3315                 </fields>
3316                 <links>
3317                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3318                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3319                 </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3323                 <retrieve/>
3324                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3325                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3326             </actions>
3327         </permacrud>
3328         </class>
3329     <class  id="aecc"
3330             controller="open-ils.cstore open-ils.pcrud"
3331             oils_obj:fieldmapper="action::emergency_closing_circulation"
3332             oils_persist:tablename="action.emergency_closing_circulation"
3333             reporter:label="Emergency Closing Circulation Entry"
3334             oils_persist:readonly="true"
3335     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3336         <fields oils_persist:primary="id">
3337             <field name="id" reporter:datatype="id" />
3338             <field name="circulation" reporter:datatype="link" />
3339                         <field name="emergency_closing" reporter:datatype="link"/>
3340             <field name="original_due_date" reporter:datatype="timestamp" />
3341             <field name="process_time" reporter:datatype="timestamp" />
3342         </fields>
3343         <links>
3344             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3345             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3346         </links>
3347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348             <actions>
3349                 <retrieve/>
3350             </actions>
3351         </permacrud>
3352     </class>
3353     <class  id="aecr"
3354             controller="open-ils.cstore open-ils.pcrud"
3355             oils_obj:fieldmapper="action::emergency_closing_reservation"
3356             oils_persist:tablename="action.emergency_closing_reservation"
3357             reporter:label="Emergency Closing Reservation Entry"
3358             oils_persist:readonly="true"
3359     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3360         <fields oils_persist:primary="id">
3361             <field name="id" reporter:datatype="id" />
3362             <field name="reservation" reporter:datatype="link" />
3363                         <field name="emergency_closing" reporter:datatype="link"/>
3364             <field name="original_end_time" reporter:datatype="timestamp" />
3365             <field name="process_time" reporter:datatype="timestamp" />
3366         </fields>
3367         <links>
3368             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3369             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3370         </links>
3371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372             <actions>
3373                 <retrieve/>
3374             </actions>
3375         </permacrud>
3376     </class>
3377     <class  id="aech"
3378             controller="open-ils.cstore open-ils.pcrud"
3379             oils_obj:fieldmapper="action::emergency_closing_hold"
3380             oils_persist:tablename="action.emergency_closing_hold"
3381             reporter:label="Emergency Closing Hold Entry"
3382             oils_persist:readonly="true"
3383     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3384         <fields oils_persist:primary="id">
3385             <field name="id" reporter:datatype="id" />
3386             <field name="hold" reporter:datatype="link" />
3387                         <field name="emergency_closing" reporter:datatype="link"/>
3388             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3389             <field name="process_time" reporter:datatype="timestamp" />
3390         </fields>
3391         <links>
3392             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3393             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3394         </links>
3395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3396             <actions>
3397                 <retrieve/>
3398             </actions>
3399         </permacrud>
3400     </class>
3401     <class  id="aecs"
3402             controller="open-ils.cstore open-ils.pcrud"
3403             oils_obj:fieldmapper="action::emergency_closing_status"
3404             oils_persist:tablename="action.emergency_closing_status"
3405             reporter:label="Emergency Closing Status"
3406             oils_persist:readonly="true"
3407     >
3408         <fields oils_persist:primary="id">
3409             <field name="id" reporter:datatype="id" />
3410             <field name="creator" reporter:datatype="link" />
3411             <field name="create_time" reporter:datatype="timestamp" />
3412             <field name="process_start_time" reporter:datatype="timestamp" />
3413             <field name="process_end_time" reporter:datatype="timestamp" />
3414             <field name="last_update_time" reporter:datatype="timestamp" />
3415             <field name="circulations" reporter:datatype="int" />
3416             <field name="circulations_complete" reporter:datatype="int" />
3417             <field name="reservations" reporter:datatype="int" />
3418             <field name="reservations_complete" reporter:datatype="int" />
3419             <field name="holds" reporter:datatype="int" />
3420             <field name="holds_complete" reporter:datatype="int" />
3421         </fields>
3422         <links>
3423             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3424         </links>
3425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3426             <actions>
3427                 <retrieve/>
3428             </actions>
3429         </permacrud>
3430     </class>
3431     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3432         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3433             <field name="id" reporter:datatype="id" />
3434             <field name="creator" reporter:datatype="link" />
3435             <field name="create_time" reporter:datatype="timestamp" />
3436             <field name="process_start_time" reporter:datatype="timestamp" />
3437             <field name="process_end_time" reporter:datatype="timestamp" />
3438             <field name="last_update_time" reporter:datatype="timestamp" />
3439             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3440             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3441             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3442             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3443             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3444         </fields>
3445         <links>
3446             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3447             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3448             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3449             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3450             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3451             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3452         </links>
3453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454             <actions>
3455                 <create permission="EMERGENCY_CLOSING">
3456                     <context link="closing" field="org_unit" />
3457                 </create>
3458                 <retrieve/>
3459                 <update permission="EMERGENCY_CLOSING">
3460                     <context link="closing" field="org_unit" />
3461                 </update>
3462                 <delete permission="EMERGENCY_CLOSING">
3463                     <context link="closing" field="org_unit" />
3464                 </delete>
3465             </actions>
3466         </permacrud>
3467     </class>
3468         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
3469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3470                         <field name="close_end" reporter:datatype="timestamp" />
3471                         <field name="close_start" reporter:datatype="timestamp" />
3472                         <field name="id" reporter:datatype="id" />
3473                         <field name="org_unit" reporter:datatype="org_unit"/>
3474                         <field name="reason" reporter:datatype="text"/>
3475                         <field name="full_day" reporter:datatype="bool"/>
3476                         <field name="multi_day" reporter:datatype="bool"/>
3477                         <field name="emergency_closing" reporter:datatype="link"/>
3478                 </fields>
3479                 <links>
3480                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3481                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3482                 </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3486                 <retrieve/>
3487                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3488                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3489             </actions>
3490         </permacrud>
3491         </class>
3492         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3494                         <field name="extended" reporter:datatype="interval"/>
3495                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3496                         <field name="max_renewals" reporter:datatype="int" />
3497                         <field name="name" reporter:datatype="text"/>
3498                         <field name="normal" reporter:datatype="interval"/>
3499                         <field name="shrt" reporter:datatype="interval"/>
3500                         <field name="max_auto_renewals" reporter:datatype="int" />
3501                 </fields>
3502                 <links>
3503                 </links>
3504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3505             <actions>
3506                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3507                 <retrieve/>
3508                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3509                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3510             </actions>
3511         </permacrud>
3512         </class>
3513
3514         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3516                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3517                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3518             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3519                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3520             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3521                 </fields>
3522                 <links>
3523             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3524                 </links>
3525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3526             <actions>
3527                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3528                 <retrieve/>
3529                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3530                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3531             </actions>
3532                 </permacrud>
3533         </class>
3534
3535         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
3536                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3538                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3539                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3540             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3541                 </fields>
3542                 <links>
3543                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3544                 </links>
3545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3546             <actions>
3547                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3548                 <retrieve/>
3549                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3550                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3551             </actions>
3552                 </permacrud>
3553         </class>
3554
3555         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3556                 <fields oils_persist:primary="id" oils_persist:sequence="">
3557                         <field name="balance_owed" reporter:datatype="money"/>
3558                         <field name="id" reporter:datatype="id" />
3559                         <field name="last_billing_note" reporter:datatype="text"/>
3560                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3561                         <field name="last_billing_type" reporter:datatype="text"/>
3562                         <field name="last_payment_note" reporter:datatype="text"/>
3563                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3564                         <field name="last_payment_type" reporter:datatype="text"/>
3565                         <field name="total_owed" reporter:datatype="money"/>
3566                         <field name="total_paid" reporter:datatype="money"/>
3567                         <field name="usr" reporter:datatype="link"/>
3568                         <field name="xact_finish" reporter:datatype="timestamp" />
3569                         <field name="xact_start" reporter:datatype="timestamp" />
3570                         <field name="xact_type" reporter:datatype="text"/>
3571                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3572                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3573                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3574                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3575                         <field name="billing_location" reporter:datatype="link"/>
3576                 </fields>
3577                 <links>
3578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3579                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3580                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3581                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3582                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3583                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3584                 </links>
3585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3586                         <actions>
3587                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3588                                         <context link="usr" field="home_ou" />
3589                                 </retrieve>
3590                         </actions>
3591                 </permacrud>
3592         </class>
3593         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
3594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3595                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3600                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3601                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3607                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3608                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3609                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3610                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3611                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3612                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3613                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3614                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3615                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3616                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3617                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3618                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3619                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3620                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3621                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3622                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3623                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3624                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3625                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3626                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3627                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3628                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3629                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3630                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3631                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3632                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3633                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3634                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3635                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3636                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3637                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3638                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3639                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3640                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3641                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3642                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3643                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3644                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3645                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3646                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3647                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3648                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3649                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3650                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3651                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3652                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3653                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3654                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3655                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3658                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3659                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3660                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3661                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3662                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3663                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3664                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3665                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3666                 </fields>
3667                 <links>
3668                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3669                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3670                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3671                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3672                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3673                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3674                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3675                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3676                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3677                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3678                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3679                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3680                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3681                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3682                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3683                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3684                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3685                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3686                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3687                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3688                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3689                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3690                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3691                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3692                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3693                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3694                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3695                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3696                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3697                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3698                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3699                 </links>
3700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3701                         <actions>
3702                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3703                         </actions>
3704                 </permacrud>
3705         </class>
3706         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3707                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3708                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3709                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3710                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3711                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3712                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3713                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3714                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3715                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3716         </fields>
3717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3718                         <actions>
3719                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3720                                 <retrieve/>
3721                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3722                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3723                         </actions>
3724                 </permacrud>
3725         </class>
3726         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3727                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3728                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3729                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3730                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3731                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3732         </fields>
3733         <links>
3734                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3735                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3736                 </links>
3737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3738                         <actions>
3739                                 <retrieve permission="RUN_REPORTS">
3740                                         <context link="usr" field="home_ou" />
3741                                 </retrieve>
3742                         </actions>
3743                 </permacrud>
3744         </class>
3745         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3746                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3747                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3748                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3749                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3750                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3751                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3752                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3753         </fields>
3754         <links>
3755                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3756                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3757                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3758                 </links>
3759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3760                         <actions>
3761                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3762                                         <context link="usr" field="home_ou" />
3763                                         <context link="ws" field="owning_lib" />
3764                                 </retrieve>
3765                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3766                                         <context link="usr" field="home_ou" />
3767                                         <context link="ws" field="owning_lib" />
3768                                 </create>
3769                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3770                                         <context link="usr" field="home_ou" />
3771                                         <context link="ws" field="owning_lib" />
3772                                 </update>
3773                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3774                                         <context link="usr" field="home_ou" />
3775                                         <context link="ws" field="owning_lib" />
3776                                 </delete>
3777                         </actions>
3778                 </permacrud>
3779         </class>
3780         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
3781                 <fields oils_persist:primary="name">
3782                         <field name="name" reporter:datatype="text"/>
3783                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3784                 </fields>
3785                 <links/>
3786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787                         <actions>
3788                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3789                                 <retrieve/>
3790                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3791                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3792                         </actions>
3793                 </permacrud>
3794         </class>
3795         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
3796                 <fields oils_persist:primary="name">
3797                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3798                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3799                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3800                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3801                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3802                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3803                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3804                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3805                 </fields>
3806                 <links>
3807                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3808                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3809                 </links>
3810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3811                         <actions>
3812                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3813                                 <retrieve/>
3814                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3815                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3816                         </actions>
3817                 </permacrud>
3818         </class>
3819         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
3820                 <fields oils_persist:primary="name">
3821                         <field name="name" reporter:datatype="text"/>
3822                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3823                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3824                         <field name="datatype" reporter:datatype="text"/>
3825                         <field name="view_perm" reporter:datatype="link"/>
3826                         <field name="update_perm" reporter:datatype="link"/>
3827                         <field name="fm_class" reporter:datatype="text"/>
3828                         <field name="grp" reporter:datatype="link"/>
3829                 </fields>
3830                 <links>
3831                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3832                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3833                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3834                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3835                 </links>
3836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3837                         <actions>
3838                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3839                                 <retrieve/>
3840                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3841                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3842                         </actions>
3843                 </permacrud>
3844         </class>
3845         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
3846                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3847                         <field name="id" />
3848                         <field name="name"  reporter:datatype="text"/>
3849                         <field name="org_unit" reporter:datatype="org_unit"/>
3850                         <field name="value"  reporter:datatype="text"/>
3851                 </fields>
3852                 <links>
3853                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3854                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3855                 </links>
3856         </class>
3857         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
3858                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3859                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3860                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3861                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3862                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3863                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3864                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3865                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3866                 </fields>
3867                 <links>
3868                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3869                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3870                 </links>
3871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3872             <actions>
3873                 <create permission="CREATE_COPY_NOTE">
3874                     <context link="owning_copy" field="circ_lib"/>
3875                 </create>
3876                 <retrieve permission="VIEW_COPY_NOTES">
3877                     <context link="owning_copy" field="circ_lib"/>
3878                 </retrieve>
3879                 <update permission="UPDATE_COPY_NOTE">
3880                     <context link="owning_copy" field="circ_lib"/>
3881                 </update>
3882                 <delete permission="DELETE_COPY_NOTE">
3883                     <context link="owning_copy" field="circ_lib"/>
3884                 </delete>
3885             </actions>
3886         </permacrud>
3887         </class>
3888         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3889                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3890                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3891                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3892                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3893                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3894                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3895                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3896                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3897                 </fields>
3898                 <links>
3899                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3900                 </links>
3901         </class>
3902         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3903                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3904                         <field name="fingerprint"  reporter:datatype="text"/>
3905                         <field name="id" reporter:datatype="id" />
3906                         <field name="master_record" reporter:datatype="link"/>
3907                         <field name="mods"  reporter:datatype="text"/>
3908                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3909                 </fields>
3910                 <links>
3911                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3912                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3913                 </links>
3914         </class>
3915         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
3916                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3917                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3918                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3919                 </fields>
3920                 <links/>
3921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922             <actions>
3923                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3924                 <retrieve/>
3925                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3926                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3927             </actions>
3928         </permacrud>
3929         </class>
3930         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
3931                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3932                         <field name="code"  reporter:datatype="text"/>
3933                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3934                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3935                 </fields>
3936                 <links/>
3937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3938             <actions>
3939                 <create permission="CREATE_PERM" global_required="true"/>
3940                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3941                 <update permission="UPDATE_PERM" global_required="true"/>
3942                 <delete permission="DELETE_PERM" global_required="true"/>
3943             </actions>
3944         </permacrud>
3945         </class>
3946         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3947                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3948                         <field name="id" reporter:datatype="id" />
3949                         <field name="metarecord" reporter:datatype="link"/>
3950                         <field name="source" reporter:datatype="link"/>
3951                 </fields>
3952                 <links>
3953                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3954                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3955                 </links>
3956         </class>
3957         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3958                         oils_obj:fieldmapper="metabib::display_entry" 
3959                         oils_persist:tablename="metabib.display_entry" 
3960                         oils_persist:field_safe="true"
3961                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3962                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3963                         <field name="id" reporter:datatype="id" />
3964                         <field name="field" reporter:datatype="link"/>
3965                         <field name="source" reporter:datatype="link"/>
3966                         <field name="value"  reporter:datatype="text"/>
3967                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3968                 </fields>
3969                 <links>
3970                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3971                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3972                 </links>
3973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3974                         <actions>
3975                                 <retrieve/>
3976                         </actions>
3977                 </permacrud>
3978         </class>
3979         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3980                 oils_persist:tablename="metabib.flat_display_entry"
3981                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3982                 oils_persist:field_safe="true"
3983                 reporter:label="Flat Display Entry" 
3984                 oils_persist:readonly="true">
3985                 <fields>
3986                         <field name="source" reporter:datatype="id" />
3987                         <field name="name" reporter:datatype="text"/>
3988                         <field name="multi" reporter:datatype="bool"/>
3989                         <field name="label" reporter:datatype="text"/>
3990                         <field name="field" reporter:datatype="link"/>
3991                         <field name="value" reporter:datatype="text"/>
3992                 </fields>
3993                 <links>
3994                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3995                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3996                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3997                 </links>
3998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3999                         <actions>
4000                                 <retrieve/>
4001                         </actions>
4002                 </permacrud>
4003         </class>
4004         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4005                 oils_persist:tablename="metabib.compressed_display_entry"
4006                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4007                 oils_persist:field_safe="true"
4008                 reporter:label="Compressed Display Entry" 
4009                 oils_persist:readonly="true">
4010                 <fields>
4011                         <field name="source" reporter:datatype="id" />
4012                         <field name="name" reporter:datatype="text"/>
4013                         <field name="multi" reporter:datatype="bool"/>
4014                         <field name="label" reporter:datatype="text"/>
4015                         <field name="field" reporter:datatype="link"/>
4016                         <field name="value" reporter:datatype="text"/>
4017                 </fields>
4018                 <links>
4019                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4020                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4021                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4022                 </links>
4023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4024                         <actions>
4025                                 <retrieve/>
4026                         </actions>
4027                 </permacrud>
4028         </class>
4029         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4030                 oils_persist:tablename="metabib.wide_display_entry"
4031                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4032                 oils_persist:field_safe="true"
4033                 reporter:label="Wide Display Entry" 
4034                 oils_persist:readonly="true">
4035                 <fields oils_persist:primary="source">
4036                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4037                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4038                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4039                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4040                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4041                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4042                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4043                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4044                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4045                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4046                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4047                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4048                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4049                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4050                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4051                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4052                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4053                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4054                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4055                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4056                 </fields>
4057                 <links>
4058                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4059                 </links>
4060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4061                         <actions>
4062                                 <retrieve/>
4063                         </actions>
4064                 </permacrud>
4065         </class>
4066
4067         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4068                 oils_persist:tablename="config.display_field_map"
4069                 oils_obj:fieldmapper="config::display_field_map"
4070                 oils_persist:field_safe="true"
4071                 reporter:label="Display Field Map">
4072                 <fields oils_persist:primary="name">
4073                         <field name="name" reporter:datatype="text"/>
4074                         <field name="field" reporter:datatype="link"/>
4075                         <field name="multi" reporter:datatype="bool"/>
4076                 </fields>
4077                 <links>
4078                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4079                 </links>
4080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4081                         <actions>
4082                                 <retrieve/>
4083                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4084                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4085                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4086                         </actions>
4087                 </permacrud>
4088         </class>
4089
4090         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4092                         <field name="id" reporter:datatype="id" />
4093                         <field name="field" reporter:datatype="link"/>
4094                         <field name="source" reporter:datatype="link"/>
4095                         <field name="value"  reporter:datatype="text"/>
4096                 </fields>
4097                 <links>
4098                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4099                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4100                 </links>
4101         </class>
4102         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
4103                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4104                         <field name="id" reporter:datatype="id" />
4105                         <field name="value" reporter:datatype="text"/>
4106                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4107                 </fields>
4108                 <links>
4109                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4110                 </links>
4111         </class>
4112         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
4113                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4114                         <field name="id" reporter:datatype="id" />
4115                         <field name="entry" reporter:datatype="link"/>
4116                         <field name="def" reporter:datatype="link"/>
4117                         <field name="source" reporter:datatype="link"/>
4118                 </fields>
4119                 <links>
4120                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4121                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4122                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4123                 </links>
4124         </class>
4125         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
4126                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4127                         <field name="id" reporter:datatype="id" />
4128                         <field name="entry" reporter:datatype="link"/>
4129                         <field name="simple_heading" reporter:datatype="link"/>
4130                 </fields>
4131                 <links>
4132                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4133                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4134                 </links>
4135         </class>
4136         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
4137                 <oils_persist:source_definition><![CDATA[
4138                         SELECT * FROM metabib.author_field_entry
4139                                                 UNION ALL
4140                         SELECT * FROM metabib.keyword_field_entry
4141                                                 UNION ALL
4142                         SELECT * FROM metabib.identifier_field_entry
4143                                                 UNION ALL
4144                         SELECT * FROM metabib.title_field_entry
4145                                                 UNION ALL
4146                         SELECT * FROM metabib.subject_field_entry
4147                                                 UNION ALL
4148                         SELECT * FROM metabib.series_field_entry
4149                 ]]></oils_persist:source_definition>
4150                 <fields>
4151                         <field name="field" reporter:datatype="link"/>
4152                         <field name="id" reporter:datatype="id" />
4153                         <field name="source" reporter:datatype="link"/>
4154                         <field name="value"  reporter:datatype="text"/>
4155                 </fields>
4156                 <links>
4157                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4158                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4159                 </links>
4160         </class>
4161         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
4162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4163                         <field name="field" reporter:datatype="link"/>
4164                         <field name="id" reporter:datatype="id" />
4165                         <field name="source" reporter:datatype="link"/>
4166                         <field name="value"  reporter:datatype="text"/>
4167                 </fields>
4168                 <links>
4169                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4170                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4171                 </links>
4172         </class>
4173         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
4174                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4175                         <field name="accepting_usr" reporter:datatype="link"/>
4176                         <field name="amount" reporter:datatype="money" />
4177                         <field name="amount_collected" reporter:datatype="money" />
4178                         <field name="cash_drawer" reporter:datatype="link"/>
4179                         <field name="id" reporter:datatype="id" />
4180                         <field name="note"  reporter:datatype="text"/>
4181                         <field name="payment_ts" reporter:datatype="timestamp"/>
4182                         <field name="xact" reporter:datatype="link"/>
4183                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4184                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4185                 </fields>
4186                 <links>
4187                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4188                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4189                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4190                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4191                 </links>
4192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4193             <actions>
4194                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4195                     <context link="xact" jump="usr" field="home_ou"/>
4196                 </retrieve>
4197                         </actions>
4198                 </permacrud>
4199         </class>
4200         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
4201                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4202                         <field name="accepting_usr" reporter:datatype="link"/>
4203                         <field name="amount" reporter:datatype="money" />
4204                         <field name="amount_collected" reporter:datatype="money" />
4205                         <field name="id" reporter:datatype="id" />
4206                         <field name="note"  reporter:datatype="text"/>
4207                         <field name="payment_ts" reporter:datatype="timestamp"/>
4208                         <field name="xact" reporter:datatype="link"/>
4209                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4210                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4211                 </fields>
4212                 <links>
4213                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4214                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4215                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4216                 </links>
4217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4218             <actions>
4219                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4220                     <context link="xact" jump="usr" field="home_ou"/>
4221                 </retrieve>
4222                         </actions>
4223                 </permacrud>
4224         </class>
4225         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4226                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4227                         <field name="accepting_usr" reporter:datatype="link"/>
4228                         <field name="amount" reporter:datatype="money" />
4229                         <field name="amount_collected" reporter:datatype="money" />
4230                         <field name="id" reporter:datatype="id" />
4231                         <field name="note"  reporter:datatype="text"/>
4232                         <field name="payment_ts" reporter:datatype="timestamp"/>
4233                         <field name="xact" reporter:datatype="link"/>
4234                         <field name="billing" reporter:datatype="link"/>
4235                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4236                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4237                 </fields>
4238                 <links>
4239                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4240                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4241                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4242                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4243                 </links>
4244         </class>
4245         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4246                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4247                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4248                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4249                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4250                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4251                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4252                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4253                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4254                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4255                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4256                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4257                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4258                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4259                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4260                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4261                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4262                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4263                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4264                 </fields>
4265                 <links>
4266                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4267                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4268                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4269                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4270                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4271                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4272                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4273                 </links>
4274         </class>
4275
4276         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
4277                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4278                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4279                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4280                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4281                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4282                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4283                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4284                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4285                 </fields>
4286                 <links/>
4287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4288             <actions>
4289                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4290                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4291                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4292                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4293             </actions>
4294         </permacrud>
4295         </class>
4296         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
4297                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4298                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4299                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4300                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4301                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4302                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4303                 </fields>
4304                 <links>
4305                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4306                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4307                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4308         </links>
4309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4310             <actions>
4311                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4312                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4313                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4314                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4315             </actions>
4316         </permacrud>
4317         </class>
4318         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
4319                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4320                         <field name="holdable" reporter:datatype="bool"/>
4321                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4322                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4323                         <field name="opac_visible" reporter:datatype="bool"/>
4324             <field name="copy_active" reporter:datatype="bool"/>
4325             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4326             <field name="is_available" reporter:datatype="bool"/>
4327                 </fields>
4328                 <links/>
4329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4330             <actions>
4331                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4332                 <retrieve/>
4333                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4334                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4335             </actions>
4336         </permacrud>
4337         </class>
4338         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
4339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4340                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4341                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4342                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4343                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4344                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4345                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4346                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4347                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4348                 </fields>
4349                 <links>
4350                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4351                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4352                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4353                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4354                 </links>
4355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4356                         <actions>
4357                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4358                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4359                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4360                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4361                         </actions>
4362                 </permacrud>
4363         </class>
4364         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4365                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4366                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4367                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4368                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4369                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4370                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4371                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4372                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4373                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4374                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4375                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4376                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4377                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4378                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4379                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4380                 </fields>
4381                 <links>
4382                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4383                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4384                 </links>
4385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4386                         <actions>
4387                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4388                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4389                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4390                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4391                         </actions>
4392                 </permacrud>
4393         </class>
4394         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
4395                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4396                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4397                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4398                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4399                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4400                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4401                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4402                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4403                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4404                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4405                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4406                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4407                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4408                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4409                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4410                 </fields>
4411                 <links>
4412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4413                 </links>
4414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4415                         <actions>
4416                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4417                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4418                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4419                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4420                         </actions>
4421                 </permacrud>
4422         </class>
4423
4424
4425         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
4426                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4427                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4428                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4430                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4431                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4432                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4433                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4434                 </fields>
4435                 <links>
4436                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4437                 </links>
4438         </class>
4439
4440         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
4441                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4442                         <field name="call_number" />
4443                         <field name="create_date" reporter:datatype="timestamp"/>
4444                         <field name="creator" reporter:datatype="link"/>
4445                         <field name="id" reporter:datatype="id" />
4446                         <field name="pub" reporter:datatype="bool"/>
4447                         <field name="title"  reporter:datatype="text"/>
4448                         <field name="value"  reporter:datatype="text"/>
4449                 </fields>
4450                 <links>
4451                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4452                 </links>
4453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4454             <actions>
4455                 <create permission="CREATE_VOLUME_NOTE">
4456                     <context link="call_number" field="owning_lib"/>
4457                 </create>
4458                 <retrieve permission="VIEW_VOLUME_NOTES">
4459                     <context link="call_number" field="owning_lib"/>
4460                 </retrieve>
4461                 <update permission="UPDATE_VOLUME_NOTE">
4462                     <context link="call_number" field="owning_lib"/>
4463                 </update>
4464                 <delete permission="DELETE_VOLUME_NOTE">
4465                     <context link="call_number" field="owning_lib"/>
4466                 </delete>
4467             </actions>
4468         </permacrud>
4469         </class>
4470         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4472                         <field name="create_date" reporter:datatype="timestamp"/>
4473                         <field name="creator" reporter:datatype="link"/>
4474                         <field name="edit_date" reporter:datatype="timestamp"/>
4475                         <field name="editor" reporter:datatype="link"/>
4476                         <field name="id" reporter:datatype="id" />
4477                         <field name="record" reporter:datatype="link"/>
4478                         <field name="value" reporter:datatype="text"/>
4479                 </fields>
4480                 <links>
4481                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4482                 </links>
4483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4484             <actions>
4485                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4486                 <retrieve/>
4487                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4488                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4489             </actions>
4490         </permacrud>
4491         </class>
4492         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4493         <oils_persist:source_definition><![CDATA[
4494 SELECT  usr,
4495         SUM(
4496             CASE
4497                 WHEN (
4498                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4499                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4500                 ) THEN 1
4501                 ELSE 0
4502             END
4503         ) AS out,
4504
4505         SUM(
4506             CASE
4507                 WHEN (
4508                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4509                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4510                 ) THEN 1
4511                 ELSE 0
4512             END
4513         ) AS overdue,
4514
4515         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4516         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4517         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4518   FROM  action.circulation
4519   WHERE checkin_time IS NULL
4520   GROUP BY 1
4521         ]]></oils_persist:source_definition>
4522         <fields oils_persist:primary="usr">
4523             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4524             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4525             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4526             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4527             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4528             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4529         </fields>
4530         <links>
4531             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4532         </links>
4533         </class>
4534         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4535         <oils_persist:source_definition><![CDATA[
4536 SELECT  usr,
4537         STRING_AGG(
4538             CASE
4539                 WHEN (
4540                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4541                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4542                 ) THEN id::TEXT
4543                 ELSE '0'
4544             END
4545         ,',') AS out,
4546
4547         STRING_AGG(
4548             CASE
4549                 WHEN (
4550                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4551                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4552                 ) THEN id::TEXT
4553                 ELSE '0'
4554             END
4555         ,',') AS overdue,
4556
4557         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4558         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4559         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4560   FROM  action.circulation
4561   WHERE checkin_time IS NULL
4562   GROUP BY 1
4563         ]]></oils_persist:source_definition>
4564         <fields oils_persist:primary="usr">
4565             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4566             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4567             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4568             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4569             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4570             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4571         </fields>
4572         <links>
4573             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4574         </links>
4575         </class>
4576         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
4577                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4578                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4579                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4580                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4581                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4582                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4583                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4584                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4585                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4586                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4587                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4588                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4589                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4590                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4591                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4592                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4593                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4594                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4595                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4596                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4597                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4598                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4599                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4600                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4601                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4602                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4603                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4604                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4605                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4606                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4607                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4608                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4609                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4610                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4611                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4612                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4613                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4614                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4615                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4616                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4617                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4618                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4619                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4620                 </fields>
4621                 <links>
4622                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4623                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4624                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4625                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4626                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4627                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4628                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4629                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4630                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4631                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4632                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4633                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4634                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4635                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4636                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4637                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4638                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4639                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4640                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4641                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4642                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4643                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4644                 </links>
4645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4646                         <actions>
4647                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4648                         </actions>
4649                 </permacrud>
4650         </class>
4651         <class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
4652                 <fields>
4653                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4654                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4655                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4656                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4657                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4658                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4659                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4660                 </fields>
4661                 <links>
4662                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4663                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4664                 </links>
4665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4666                         <actions>
4667                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4668                         </actions>
4669                 </permacrud>
4670         </class>
4671         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4672                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4673                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4674                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4675                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4676                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4677                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4678                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4679                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4680                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4681                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4682                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4683                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4684                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4685                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4686                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4687                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4688                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4689                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4690                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4691                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4692                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4693                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4694                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4695                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4696                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4697                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4698                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4699                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4700                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4701                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4702                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4704                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4705                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4706                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4707                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4708                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4709                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4711                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4712                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4713                 </fields>
4714                 <links>
4715                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4716                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4717                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4718                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4719                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4721                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4722                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4723                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4724                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4725                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4726                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4727                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4728                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4729                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4730                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4731                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4732                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4733                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4734                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4735                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4736                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4737                 </links>
4738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4739                         <actions>
4740                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4741                         </actions>
4742                 </permacrud>
4743         </class>
4744
4745         <class id="combcirc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4747                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4748                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4749                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4750                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4751                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4752                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4753                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4754                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4755                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4756                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4757                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4758                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4759                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4760                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4761                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4762                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4763                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4764                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4765                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4766                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4767                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4768                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4769                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4770                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4771                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4772                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4773                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4774                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4775                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4776                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4777                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4779                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4780                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4781                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4782                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4783                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4784                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4785                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4786                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4787                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4788                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4789                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4790                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4791                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4792                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4793                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4794                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4795                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4796                 </fields>
4797                 <links>
4798                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4799                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4800                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4801                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4802                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4803                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4804                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4805                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4806                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4807                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4808                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4809                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4810                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4811                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4812                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4813                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4814                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4815                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4816                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4817                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4818                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4819                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4820                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4821                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4822                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4823                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4824                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4825                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4826                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4827                 </links>
4828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4829                         <actions>
4830                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4831                         </actions>
4832                 </permacrud>
4833         </class>
4834         <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
4835                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4836                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4837                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4838                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4839                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4840                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4841                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4842                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4843                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4844                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4845                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4846                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4847                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4848                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4849                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4850                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4851                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4852                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4853                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4854                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4855                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4856                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4857                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4858                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4859                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4860                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4861                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4862                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4863                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4864                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4865                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4866                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4869                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4870                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4871                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4872                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4873                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4874                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4875                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4876                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4877                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4878                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4879                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4880                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4881                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4882                 </fields>
4883                 <links>
4884                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4885                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4886                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4887                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4888                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4889                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4890                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4891                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4892                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4893                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4894                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4895                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4896                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4897                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4898                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4899                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4900                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4901                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4902                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4903                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4904                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4905                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4906                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4907                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4908                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4909                 </links>
4910         </class>
4911         <class id="auch" 
4912                 controller="open-ils.cstore" 
4913                 oils_obj:fieldmapper="action::user_circ_history" 
4914                 oils_persist:tablename="action.usr_circ_history" 
4915                 reporter:label="User Checkout History">
4916                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4917                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4918                         <!-- prevent reporting on the user that owns the checkout history -->
4919                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4920                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4921                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4922                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4923                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4924                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4925                 </fields>
4926                 <links>
4927                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4928                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4929                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4930                 </links>
4931         </class>
4932         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
4933                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4934                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4935                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4936                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4937                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4938                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4939                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4940                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4941                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4942                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4943                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4944                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4947                 </fields>
4948                 <links>
4949                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4951                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4952                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4953                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4954                 </links>
4955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4956                         <actions>
4957                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4958                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4959                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4960                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4961                         </actions>
4962                 </permacrud>
4963         </class>
4964
4965         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4967                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4968                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4969                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4970                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4971                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4972                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4973                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4974                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4975                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4976                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4977                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4978                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4979                 </fields>
4980                 <links>
4981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4983                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4984                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4985                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4986                 </links>
4987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4988                         <actions>
4989                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4990                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4991                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4992                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4993                         </actions>
4994                 </permacrud>
4995         </class>
4996         
4997         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
4998                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4999                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5000                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5001                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
5002                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5003                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5004                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5005                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5006                 </fields>
5007                 <links>
5008                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5009                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5010                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5011                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5012                 </links>
5013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5014                         <actions>
5015                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5016                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5017                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5018                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5019                         </actions>
5020                 </permacrud>
5021         </class>
5022         
5023         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
5024                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5025                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5026                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5027                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
5028                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
5029                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5030                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5031                 </fields>
5032                 <links>
5033                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5034                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5035                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5036                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5037                 </links>
5038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5039                         <actions>
5040                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5041                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5042                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5043                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5044                         </actions>
5045                 </permacrud>
5046         </class>
5047         
5048         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
5049                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5050                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5051                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
5052                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
5053                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
5054                 </fields>
5055                 <links>
5056                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5057                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5058                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5059                 </links>
5060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5061                         <actions>
5062                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5063                     <context link="resource" field="owner" />
5064                 </create>
5065                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5066                     <context link="resource" field="owner" />
5067                 </retrieve>
5068                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5069                     <context link="resource" field="owner" />
5070                 </update>
5071                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5072                     <context link="resource" field="owner" />
5073                 </delete>
5074                         </actions>
5075                 </permacrud>
5076         </class>
5077         
5078         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5079                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5080                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5081                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5082                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5083                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5084                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5085                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5086                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5087                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5088                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5089                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5090                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5091                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
5092                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
5093                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5097                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5098                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5099                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5100                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5101                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5102                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5103                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5104                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5105                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5106                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5107                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5108                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5109                 </fields>
5110                 <links>
5111                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5112                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5113                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5114                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5115                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5116                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5117                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5118                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5119                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5120                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5121                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
5122                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5123                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5124                 </links>
5125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5126                         <actions>
5127                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5128                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5129                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5130                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5131                         </actions>
5132                 </permacrud>
5133         </class>
5134         
5135         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
5136                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5137                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5138                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5139                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5140                 </fields>
5141                 <links>
5142                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5143                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5144                 </links>
5145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5146                         <actions>
5147                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5148                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5149                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5150                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5151                         </actions>
5152                 </permacrud>
5153         </class>
5154
5155         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
5156                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5157                         <field name="bucket" reporter:datatype="link"/>
5158                         <field name="id" reporter:datatype="id" />
5159                         <field name="target_call_number" reporter:datatype="link" />
5160                         <field name="create_time" reporter:datatype="timestamp" />
5161                         <field name="pos" reporter:datatype="int" />
5162                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5163                 </fields>
5164                 <links>
5165                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5166                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5167             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5168                 </links>
5169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5170                         <actions>
5171                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5172                     <context link="bucket" owning_lib="owning_lib"/>
5173                 </retrieve>
5174             </actions>
5175         </permacrud>
5176         </class>
5177         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
5178                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5179                         <field name="id" reporter:datatype="id" />
5180                         <field name="item" reporter:datatype="link"/>
5181                         <field name="note" reporter:datatype="text" />
5182                 </fields>
5183                 <links>
5184                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5185                 </links>
5186         </class>
5187         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
5188                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5189                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5190                         <field name="btype" reporter:datatype="text"/>
5191                         <field name="id" reporter:datatype="id" />
5192                         <field name="name" reporter:datatype="text"/>
5193                         <field name="description" reporter:datatype="text"/>
5194                         <field name="owner" reporter:datatype="link"/>
5195                         <field name="pub" reporter:datatype="bool"/>
5196                         <field name="create_time" reporter:datatype="timestamp" />
5197                         <field name="owning_lib" reporter:datatype="org_unit" />
5198                 </fields>
5199                 <links>
5200                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5201                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5202                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5203                 </links>
5204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5205                         <actions>
5206                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5207                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5208                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5209                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5210                         </actions>
5211                 </permacrud>
5212         </class>
5213         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5215                         <field name="id" reporter:datatype="id" />
5216                         <field name="bucket" reporter:datatype="link"/>
5217                         <field name="note" reporter:datatype="text" />
5218                 </fields>
5219                 <links>
5220                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5221                 </links>
5222         </class>
5223         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
5224                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5225                         <field name="hold" reporter:datatype="link"/>
5226                         <field name="id" reporter:datatype="id" />
5227                         <field name="target_copy" reporter:datatype="link"/>
5228                         <field name="proximity" reporter:datatype="number"/>
5229                 </fields>
5230                 <links>
5231                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5232                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5233                 </links>
5234         </class>
5235         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
5236                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5237                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5238                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5239                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5240                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5241                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5242                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5243                 </fields>
5244                 <links>
5245                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5246                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5247                 </links>
5248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5249             <actions>
5250                 <create permission="CREATE_HOLD_NOTIFICATION">
5251                                         <context link="hold" jump="usr" field="home_ou" />
5252                                 </create>
5253                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5254                                         <context link="hold" jump="usr" field="home_ou" />
5255                                 </retrieve>
5256                 <update permission="CREATE_HOLD_NOTIFICATION">
5257                                         <context link="hold" jump="usr" field="home_ou" />
5258                                 </update>
5259                 <delete permission="CREATE_HOLD_NOTIFICATION">
5260                                         <context link="hold" jump="usr" field="home_ou" />
5261                                 </delete>
5262             </actions>
5263         </permacrud>
5264         </class>
5265         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
5266                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5267                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5268                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5269                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5270                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5271                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5272                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5273                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5274                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5275                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5276                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5277                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5278                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5279                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5280                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5281                 </fields>
5282                 <links>
5283                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5284                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5285                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5286                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5287                 </links>
5288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5289             <actions>
5290                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5291                 <retrieve/>
5292                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5293                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5294             </actions>
5295         </permacrud>
5296         </class>
5297         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
5298                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5299                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5300                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5301                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5302                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5303             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5304             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5305             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5306                 </fields>
5307                 <links>
5308                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5309                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5310                 </links>
5311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5312             <actions>
5313                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5314                 <retrieve/>
5315                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5316                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5317             </actions>
5318         </permacrud>
5319         </class>
5320         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5322                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5323             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5324             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5325                 </fields>
5326                 <links>
5327                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5328                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5329                 </links>
5330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5331             <actions>
5332                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5333                                         <context link="lgroup" field="owner" />
5334                 </create>
5335                 <retrieve/>
5336                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5337                                         <context link="lgroup" field="owner" />
5338                 </update>
5339                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5340                                         <context link="lgroup" field="owner" />
5341                 </delete>
5342             </actions>
5343         </permacrud>
5344         </class>
5345
5346     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
5347         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5348             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5349             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5350             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5351             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5352         </fields>
5353         <links>
5354             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5355             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5356         </links>
5357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5358             <actions>
5359                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5360                 <retrieve/>
5361                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5362                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5363             </actions>
5364         </permacrud>
5365     </class>
5366
5367         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5368                 <fields>
5369                         <field name="sre_id" oils_persist:virtual="true" />
5370                         <field name="location" oils_persist:virtual="true" />
5371                         <field name="owning_lib" oils_persist:virtual="true" />
5372                         <field name="basic_holdings" oils_persist:virtual="true" />
5373                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5374                         <field name="supplement_holdings" oils_persist:virtual="true" />
5375                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5376                         <field name="index_holdings" oils_persist:virtual="true" />
5377                         <field name="index_holdings_add" oils_persist:virtual="true" />
5378                         <field name="online" oils_persist:virtual="true" />
5379                         <field name="missing" oils_persist:virtual="true" />
5380                         <field name="incomplete" oils_persist:virtual="true" />
5381                 </fields>
5382         </class>
5383
5384         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
5385                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5386                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5387                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5388                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5389                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5390                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5391                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5392                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5393                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5394                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5395                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5396                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5397                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5398                 </fields>
5399                 <links>
5400                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5401                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5402                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5403                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5404                 </links>
5405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5406                         <actions>
5407                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5408                                 <retrieve/>
5409                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5410                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5411                         </actions>
5412                 </permacrud>
5413         </class>
5414
5415         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
5416                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5417                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5418                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5419                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5420                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5421                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5422                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5423                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5424                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5425                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5426                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5427                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5428                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5429                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5430                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5431                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5432                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5433                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5434                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5435                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5436                 </fields>
5437                 <links>
5438                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5439                 </links>
5440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5441                         <actions>
5442                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5443                                         <context link="subscription" field="owning_lib" />
5444                                 </create>
5445                                 <retrieve />
5446                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5447                                         <context link="subscription" field="owning_lib" />
5448                                 </update>
5449                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5450                                         <context link="subscription" field="owning_lib" />
5451                                 </delete>
5452                         </actions>
5453                 </permacrud>
5454         </class>
5455
5456         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5457                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5459                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5460                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5461                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5462                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5463                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5464                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5465                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5466                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5467                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5468                 </fields>
5469                 <links>
5470                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5472                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5473                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5474                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5475                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5476                 </links>
5477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5478                         <actions>
5479                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5480                                 <retrieve />
5481                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5482                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5483                         </actions>
5484                 </permacrud>
5485         </class>
5486
5487         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5488                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5489                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5490                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5491                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5492                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5493                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5494                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5495                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5496                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5497                 </fields>
5498                 <links>
5499                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5500                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5501                 </links>
5502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5503                         <actions>
5504                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5505                     <context link="subscription" field="owning_lib"/>
5506                 </create>
5507                                 <retrieve />
5508                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5509                     <context link="subscription" field="owning_lib"/>
5510                 </update>
5511                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5512                     <context link="subscription" field="owning_lib"/>
5513                 </delete>
5514                         </actions>
5515                 </permacrud>
5516         </class>
5517
5518         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5519                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5520                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5521                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5522                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5523                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5524                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5525                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5526                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5527                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5528                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5529                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5530                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5531                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5532                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5533                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5535                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5537                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5538                 </fields>
5539                 <links>
5540                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5541                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5542                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5543                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5544                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5545                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5546                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5547                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5548                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5549                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5550                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5551                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5552                 </links>
5553                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5554                         <actions>
5555                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5556                                 <retrieve />
5557                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5558                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5559                         </actions>
5560                 </permacrud>
5561         </class>
5562
5563         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
5564                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5565                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5566                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5567                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5568                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5570                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5571                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5572                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5573                 </fields>
5574                 <links>
5575                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5576                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5577                 </links>
5578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5579                         <actions>
5580                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5581                                         <context link="distribution" field="holding_lib" />
5582                                 </create>
5583                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5584                                         <context link="distribution" field="holding_lib" />
5585                                 </retrieve>
5586                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5587                                         <context link="distribution" field="holding_lib" />
5588                                 </update>
5589                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5590                                         <context link="distribution" field="holding_lib" />
5591                                 </delete>
5592                         </actions>
5593                 </permacrud>
5594         </class>
5595
5596         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5597                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5598                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5599                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5600                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5601                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5602                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5603                 </fields>
5604                 <links>
5605                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5606                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5607                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5608                 </links>
5609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5610                         <actions>
5611                                 <create permission="ADMIN_SERIAL_STREAM">
5612                                         <context link="distribution" field="holding_lib" />
5613                                 </create>
5614                                 <retrieve />
5615                                 <update permission="ADMIN_SERIAL_STREAM">
5616                                         <context link="distribution" field="holding_lib" />
5617                                 </update>
5618                                 <delete permission="ADMIN_SERIAL_STREAM">
5619                                         <context link="distribution" field="holding_lib" />
5620                                 </delete>
5621                         </actions>
5622                 </permacrud>
5623         </class>
5624
5625         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
5626                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5627                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5628                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5629                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5630                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5631                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5632                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5633                 </fields>
5634                 <links>
5635                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5636                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5637                 </links>
5638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5639                         <actions>
5640                                 <create permission="ADMIN_SERIAL_STREAM">
5641                                         <context link="stream" jump="distribution" field="holding_lib" />
5642                                 </create>
5643                                 <retrieve permission="RECEIVE_SERIAL">
5644                                         <context link="stream" jump="distribution" field="holding_lib" />
5645                                 </retrieve>
5646                                 <update permission="ADMIN_SERIAL_STREAM">
5647                                         <context link="stream" jump="distribution" field="holding_lib" />
5648                                 </update>
5649                                 <delete permission="ADMIN_SERIAL_STREAM">
5650                                         <context link="stream" jump="distribution" field="holding_lib" />
5651                                 </delete>
5652                         </actions>
5653                 </permacrud>
5654         </class>
5655
5656         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5657                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5658                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5659                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5660                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5661                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5662                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5663                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5664                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5665                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5666                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5667                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5668                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5669                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5670                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5671                 </fields>
5672                 <links>
5673                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5674                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5675                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5676                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5677                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5678                 </links>
5679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5680                         <actions>
5681                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5682                                         <context link="subscription" field="owning_lib" />
5683                                 </create>
5684                                 <retrieve/>
5685                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5686                                         <context link="subscription" field="owning_lib" />
5687                                 </update>
5688                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5689                                         <context link="subscription" field="owning_lib" />
5690                                 </delete>
5691                         </actions>
5692                 </permacrud>
5693         </class>
5694
5695         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5697                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5698                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5699                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5700                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5701                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5702                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5703                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5704                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5705                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5706                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5707                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5708                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5709                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5710                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5711                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5712                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5713                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5714                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5715                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5716                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5717                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5718                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5719                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5720                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5721                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5722                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5723                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5724                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5725                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5726                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5727                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5728                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5729                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5730                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5731                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5732                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5733                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5734                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5735                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5736                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5737                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5738                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5739                 </fields>
5740                 <links>
5741                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5742                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5743                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5744                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5745                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5746                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5747                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5748                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5749                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5750                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5751                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5752                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5753                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5754                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5755                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5756                 </links>
5757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5758                         <actions>
5759                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5760                                 <retrieve/>
5761                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5762                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5763                         </actions>
5764                 </permacrud>
5765         </class>
5766
5767         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5768                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5769                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5770                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5771                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5772                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5775                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5776                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5777                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5778                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5780                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5781                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5782                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5783                 </fields>
5784                 <links>
5785                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5786                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5787                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5788                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5789                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5790                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5791                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5792                 </links>
5793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5794                         <actions>
5795                                 <create permission="ADMIN_SERIAL_ITEM">
5796                                         <context link="stream" jump="distribution" field="holding_lib" />
5797                                 </create>
5798                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5799                                         <context link="stream" jump="distribution" field="holding_lib" />
5800                                 </retrieve>
5801                                 <update permission="ADMIN_SERIAL_ITEM">
5802                                         <context link="stream" jump="distribution" field="holding_lib" />
5803                                 </update>
5804                                 <delete permission="ADMIN_SERIAL_ITEM">
5805                                         <context link="stream" jump="distribution" field="holding_lib" />
5806                                 </delete>
5807                         </actions>
5808                 </permacrud>
5809         </class>
5810
5811         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5812                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5813                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5814                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5815                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5816                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5817                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5818                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5819                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5820                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5821                 </fields>
5822                 <links>
5823                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5824                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5825                 </links>
5826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5827                         <actions>
5828                                 <create permission="ADMIN_SERIAL_ITEM">
5829                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5830                                 </create>
5831                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5832                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5833                                 </retrieve>
5834                                 <update permission="ADMIN_SERIAL_ITEM">
5835                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5836                                 </update>
5837                                 <delete permission="ADMIN_SERIAL_ITEM">
5838                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5839                                 </delete>
5840                         </actions>
5841                 </permacrud>
5842         </class>
5843         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
5844                 <fields>
5845                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5846                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5847                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5848                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5849                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5850                 </fields>
5851                 <links>
5852                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5853                 </links>
5854         </class>
5855         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
5856                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5857                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5858                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5859                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5860                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5861                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5862                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5863                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5864                 </fields>
5865                 <links>
5866                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5867                 </links>
5868         </class>
5869         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
5870                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5871                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5872                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5873                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5874                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5875                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5876                 </fields>
5877                 <links>
5878                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5879                 </links>
5880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5881                         <actions>
5882                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5883                                         <context link="distribution" field="holding_lib" />
5884                                 </create>
5885                                 <retrieve/>
5886                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5887                                         <context link="distribution" field="holding_lib" />
5888                                 </update>
5889                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5890                                         <context link="distribution" field="holding_lib" />
5891                                 </delete>
5892                         </actions>
5893                 </permacrud>
5894         </class>
5895
5896         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
5897                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5898                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5899                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5900                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5901                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5902                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5903                 </fields>
5904                 <links>
5905                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5906                 </links>
5907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5908                         <actions>
5909                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5910                                         <context link="distribution" field="holding_lib" />
5911                                 </create>
5912                                 <retrieve/>
5913                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5914                                         <context link="distribution" field="holding_lib" />
5915                                 </update>
5916                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5917                                         <context link="distribution" field="holding_lib" />
5918                                 </delete>
5919                         </actions>
5920                 </permacrud>
5921         </class>
5922
5923         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
5924                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5925                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5926                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5927                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5928                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5929                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5930                 </fields>
5931                 <links>
5932                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5933                 </links>
5934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5935                         <actions>
5936                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5937                                         <context link="distribution" field="holding_lib" />
5938                                 </create>
5939                                 <retrieve/>
5940                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5941                                         <context link="distribution" field="holding_lib" />
5942                                 </update>
5943                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5944                                         <context link="distribution" field="holding_lib" />
5945                                 </delete>
5946                         </actions>
5947                 </permacrud>
5948         </class>
5949
5950         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
5951                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5952                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5953                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5954                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5955                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5956                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5957                 </fields>
5958                 <links>
5959                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5960                 </links>
5961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5962                         <actions>
5963                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5964                                 <retrieve/>
5965                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5966                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5967                         </actions>
5968                 </permacrud>
5969         </class>
5970
5971         <class id="ascecm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
5972                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5973                         <field name="id" reporter:datatype="id" />
5974                         <field name="owning_copy" reporter:datatype="link"/>
5975                         <field name="stat_cat" reporter:datatype="link"/>
5976                         <field name="stat_cat_entry" reporter:datatype="link"/>
5977                 </fields>
5978                 <links>
5979                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5980                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5981                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5982                 </links>
5983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5984                         <actions>
5985                                 <retrieve/>
5986                         </actions>
5987                 </permacrud>
5988         </class>
5989         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
5990                 <fields oils_persist:primary="code">
5991                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5992                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5993                 </fields>
5994                 <links/>
5995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5996             <actions>
5997                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5998                 <retrieve/>
5999                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6000                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6001             </actions>
6002         </permacrud>
6003         </class>
6004         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
6005                 <fields oils_persist:primary="code">
6006                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6007                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6008                 </fields>
6009                 <links/>
6010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6011             <actions>
6012                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6013                 <retrieve/>
6014                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6015                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6016             </actions>
6017         </permacrud>
6018         </class>
6019         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
6020                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6021                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6022                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6023                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6024                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6025                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6026                 </fields>
6027                 <links>
6028             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6029         </links>
6030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6031             <actions>
6032                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6033                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6034                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6035                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6036             </actions>
6037         </permacrud>
6038         </class>
6039         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
6040                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6041                         <field name="id" reporter:datatype="id" />
6042                         <field name="name" reporter:datatype="text"/>
6043                 </fields>
6044                 <links/>
6045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6046             <actions>
6047                 <create permission="CREATE_LASSO" global_required="true"/>
6048                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6049                 <update permission="UPDATE_LASSO" global_required="true"/>
6050                 <delete permission="DELETE_LASSO" global_required="true"/>
6051             </actions>
6052         </permacrud>
6053         </class>
6054         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6056                         <field name="id" reporter:datatype="id" />
6057                         <field name="lasso" reporter:datatype="link"/>
6058                         <field name="org_unit" reporter:datatype="org_unit"/>
6059                 </fields>
6060                 <links>
6061                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6062                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6063                 </links>
6064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6065             <actions>
6066                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6067                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6068                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6069                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6070             </actions>
6071         </permacrud>
6072         </class>
6073         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
6074                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6075                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6076                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6077                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6078                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6079                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6080                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6081                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6082                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6083                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6084                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6085                 </fields>
6086                 <links>
6087                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6088                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6089                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6090                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6091                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6092                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6093                 </links>
6094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6095             <actions>
6096                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6097                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6098                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6099                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6100             </actions>
6101         </permacrud>
6102         </class>
6103         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6105                         <field name="id" reporter:datatype="id" />
6106                         <field name="from_org" reporter:datatype="org_unit"/>
6107                         <field name="to_org" reporter:datatype="org_unit"/>
6108                         <field name="prox" reporter:datatype="int" />
6109                 </fields>
6110                 <links>
6111                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6112                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6113                 </links>
6114         </class>
6115         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
6116                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6117                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6118                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6119                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6120                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6121                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6122                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6123                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6124                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6125                 </fields>
6126                 <links/>
6127         </class>
6128         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6129                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6130                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6132                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6133                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6134                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6135                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6136                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6137                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6138                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6139                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6140                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6141                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6142                 </fields>
6143                 <links>
6144                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6145                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6146                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6147                 </links>
6148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6149             <actions>
6150                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6151                 <retrieve/>
6152                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6153                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6154             </actions>
6155         </permacrud>
6156         </class>
6157         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
6158                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6159                         <field name="address_type"  reporter:datatype="text"/>
6160                         <field name="city"  reporter:datatype="text"/>
6161                         <field name="country"  reporter:datatype="text"/>
6162                         <field name="county"  reporter:datatype="text"/>
6163                         <field name="id" reporter:datatype="id" />
6164                         <field name="org_unit" reporter:datatype="org_unit"/>
6165                         <field name="post_code"  reporter:datatype="text"/>
6166                         <field name="state"  reporter:datatype="text"/>
6167                         <field name="street1"  reporter:datatype="text"/>
6168                         <field name="street2"  reporter:datatype="text"/>
6169                         <field name="valid" reporter:datatype="bool"/>
6170                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
6171                 </fields>
6172                 <links>
6173                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6174                 </links>
6175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6176             <actions>
6177                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6178                 <retrieve/>
6179                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6180                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6181             </actions>
6182         </permacrud>
6183         </class>
6184         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
6185                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6186                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6187                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6188                         <field name="query_text" reporter:datatype="text"/>
6189                 </fields>
6190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6191             <actions>
6192                 <retrieve/>
6193             </actions>
6194         </permacrud>
6195         </class>
6196
6197         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6199                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6200                         <field name="owner" reporter:datatype="org_unit"/>
6201                         <field name="code" reporter:datatype="text"/>
6202                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6203                         <field name="create_date" reporter:datatype="timestamp"/>
6204                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6205                 </fields>
6206                 <links>
6207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6208                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6209                 </links>
6210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6211             <actions>
6212                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6213                 <retrieve/>
6214                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6215                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6216             </actions>
6217         </permacrud>
6218         </class>
6219         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
6220                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6221                         <field name="id" reporter:datatype="id"/>
6222                         <field name="grp" reporter:datatype="link"/>
6223                         <field name="pos" reporter:datatype="int"/>
6224                         <field name="query" reporter:datatype="link"/>
6225                 </fields>
6226                 <links>
6227                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6228                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6229                 </links>
6230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6231             <actions>
6232                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6233                     <context link="grp" field="owner"/>
6234                 </create>
6235                 <retrieve/>
6236                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6237                     <context link="grp" field="owner"/>
6238                 </update>
6239                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6240                     <context link="grp" field="owner"/>
6241                 </delete>
6242             </actions>
6243         </permacrud>
6244         </class>
6245
6246         <!-- A note: Please update alhr and ahopl when updating ahr -->
6247         <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
6248                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6249                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6250                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6251                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6252                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6253                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6254                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6255                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6256                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6257                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6258                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6259                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6260                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6261                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6262                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6263                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6264                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6265                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6266                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6267                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6268                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6269                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6270                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6271                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6272                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6273                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6274                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6275                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6276                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6277                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6279                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6280                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6281                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6282                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6283                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6284                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6285                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6286                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6287                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6288                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6289                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6290                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6291                 </fields>
6292                 <links>
6293                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6294                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6295                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6296                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6297                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6298                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6299                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6300                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6301                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6302                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6303                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6304                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6305                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6306                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6307                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6308                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6309                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6310                 </links>
6311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6312                         <actions>
6313                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6314                         </actions>
6315                 </permacrud>
6316         </class>
6317         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
6318                 <oils_persist:source_definition><![CDATA[
6319                 SELECT
6320                         ahr.*,
6321                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6322                                 copy_location_order_position,
6323                         CASE WHEN au.alias IS NOT NULL THEN
6324                                 au.alias
6325                         ELSE
6326                                 au.first_given_name
6327                         END AS usr_alias_or_first_given_name,
6328                         au.first_given_name AS usr_first_given_name,
6329                         au.second_given_name AS usr_second_given_name,
6330                         au.family_name AS usr_family_name,
6331                         au.prefix AS usr_prefix,
6332                         au.suffix AS usr_suffix,
6333                         au.alias AS usr_alias,
6334                         CASE WHEN au.alias IS NOT NULL THEN
6335                                 au.alias
6336                         ELSE
6337                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6338                                         COALESCE(au.family_name, ''),
6339                                         COALESCE(au.suffix, ''),
6340                                         ', ',
6341                                         COALESCE(au.prefix, ''),
6342                                         COALESCE(au.first_given_name, ''),
6343                                         COALESCE(au.second_given_name, '')
6344                                 ], ' '), E'\\s+,', ',')
6345                         END AS usr_alias_or_display_name,
6346                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6347                                 COALESCE(au.family_name, ''),
6348                                 COALESCE(au.suffix, ''),
6349                                 ', ',
6350                                 COALESCE(au.prefix, ''),
6351                                 COALESCE(au.first_given_name, ''),
6352                                 COALESCE(au.second_given_name, '')
6353                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6354                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6355                                 AS call_number_label,
6356                         siss.label AS issuance_label,
6357                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6358                         ahcm_1.copy_count AS potential_copies
6359                 FROM action.hold_request ahr
6360                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6361                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6362                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6363                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6364                 JOIN actor.usr au ON (au.id = ahr.usr)
6365                 JOIN (
6366                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6367                         FROM asset.copy_location
6368                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6369                 LEFT JOIN actor.usr_standing_penalty ausp 
6370                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6371                 LEFT JOIN config.standing_penalty csp
6372                         ON (
6373                                 csp.id = ausp.standing_penalty AND 
6374                                 csp.block_list LIKE '%CAPTURE%' AND (
6375                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6376                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6377                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6378                                         )
6379                                 )
6380                         )
6381                 JOIN (
6382                         SELECT COUNT(target_copy) AS copy_count, hold
6383                         FROM action.hold_copy_map
6384                         GROUP BY 2
6385                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6386                 LEFT JOIN serial.issuance siss
6387                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6388                 LEFT JOIN asset.copy_location_order acplo
6389                         ON (acp.location = acplo.location AND
6390                                 acp.circ_lib = acplo.org)
6391                 WHERE
6392                         ahr.capture_time IS NULL AND
6393                         ahr.cancel_time IS NULL AND
6394                         csp.id IS NULL AND
6395                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6396                         acp.status IN (0,7)
6397                 ]]></oils_persist:source_definition>
6398                 <fields oils_persist:primary="id">
6399                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6400                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6401                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6402                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6403                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6404                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6405                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6406                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6407                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6408                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6409                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6410                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6411                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6412                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6413                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6414                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6415                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6416                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6417                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6418                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6419                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6420                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6421                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6422                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6423                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6425                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6426                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6427                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6428                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6429                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6430                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6431                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6432                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6433                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6434                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6435                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6436                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6437                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6438                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6439                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6440                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6441                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6442                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6443                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6444                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6445                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6446                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6447                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6448                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6449                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6450                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6451                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6452                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6453                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6454                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6455                 </fields>
6456                 <links>
6457                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6458                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6459                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6460                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6461                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6462                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6463                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6464                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6465                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6466                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6467                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6468                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6469                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6470                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6471                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6472                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6473                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6474                 </links>
6475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6476                         <actions>
6477                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6478                         </actions>
6479                 </permacrud>
6480         </class>
6481         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6482                 <oils_persist:source_definition><![CDATA[
6483                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL AND current_copy IS NOT NULL AND fulfillment_time IS NULL GROUP BY current_copy)x USING (current_copy, capture_time)
6484                 ]]></oils_persist:source_definition>
6485                 <fields oils_persist:primary="id">
6486                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6487                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6488                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6489                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6490                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6491                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6492                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6493                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6494                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6495                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6496                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6497                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6498                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6499                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6500                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6501                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6502                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6503                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6504                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6505                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6506                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6507                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6508                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6509                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6510                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6511                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6512                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6513                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6514                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6515                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6516                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6517                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6518                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6519                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6520                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6521                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6522                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6523                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6524                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6525                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6526                 </fields>
6527                 <links>
6528                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6529                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6530                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6531                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6532                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6533                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6534                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6535                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6536                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6537                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6538                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6539                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6540                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6541                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6542                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6543                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6544                 </links>
6545         </class>
6546
6547         <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
6548                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6549                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6550                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6551                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6552                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6553                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6554                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6555                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6556                 </fields>
6557                 <links>
6558                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6559                 </links>
6560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6561                         <actions>
6562                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6563                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6564                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6565                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6566                         </actions>
6567                 </permacrud>
6568         </class>
6569         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6571                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6572                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6573                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6574                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6575                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6576                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6577                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6578                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6579                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6580                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6581                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6582                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6583                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6584                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6585                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6586                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6587                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6588                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6589                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6590                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6591                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6592                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6593                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6594                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6595                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6596                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6597                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6598                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6599                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6600                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6601                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6602                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6603                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6604                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6605                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6606                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6607                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6608                 </fields>
6609                 <links>
6610                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6611                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6612                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6613                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6614                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6615                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6616                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6617                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6618                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6619                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6620                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6621                 </links>
6622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623                         <actions>
6624                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6625                         </actions>
6626                 </permacrud>
6627         </class>
6628         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
6629                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6630                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6631                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6632                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6633                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6634                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6635                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6636                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6637                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6638                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6639                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6640                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6641                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6642                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6643                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6644                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6646                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6647                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6648                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6649                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6650                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6651                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6652                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6653                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6654                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6655                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6656                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6657                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6658                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6660                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6661                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6662                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6663                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6664                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6665                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6666                 </fields>
6667                 <links>
6668                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6669                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6670                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6671                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6672                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6673                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6674                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6675                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6676                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6677                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6678                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6679                 </links>
6680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6681                         <actions>
6682                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6683                         </actions>
6684                 </permacrud>
6685         </class>
6686
6687         <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">
6688                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6689                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6690                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6691                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6692                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6693                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6694                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6695                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6696                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6697                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6698                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6699                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6700                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6701                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6702                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6703                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6704                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6705                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6706                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6707                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6708                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6709                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6710                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6711                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6712                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6713                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6714                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6715                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6716                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6717                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6718                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6719                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6720                 </fields>
6721                 <links>
6722                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6723                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6724                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6725                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6726                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6727                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6728                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6729                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6730                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6731                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6732                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6733                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6734                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6735                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6736                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6737                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6738                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6739                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6740                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6741                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6742                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6743                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6744                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6745                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6746                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6747                 </links>
6748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6749             <actions>
6750                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6751                 <retrieve />
6752                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6753                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6754             </actions>
6755         </permacrud>
6756         </class>
6757         <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
6758                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6759                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6760                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6761                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6762                 </fields>
6763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6764                         <actions>
6765                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6766                                 <retrieve/>
6767                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6768                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6769                         </actions>
6770                 </permacrud>
6771         </class>
6772         <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
6773                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6775                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6776                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6777                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6778                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6779                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6780                 </fields>
6781                 <links>
6782                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6783                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6784                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6785                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6786                 </links>
6787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6788                         <actions>
6789                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6790                                 <retrieve/>
6791                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6792                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6793                         </actions>
6794                 </permacrud>
6795         </class>
6796         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6797                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6798                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6799                         <field name="btype" reporter:datatype="text"/>
6800                         <field name="id" reporter:datatype="id" />
6801                         <field name="name"  reporter:datatype="text"/>
6802                         <field name="description" reporter:datatype="text"/>
6803                         <field name="owner" reporter:datatype="link"/>
6804                         <field name="pub" reporter:datatype="bool"/>
6805                         <field name="create_time" reporter:datatype="timestamp" />
6806                         <field name="owning_lib" reporter:datatype="org_unit" />
6807                 </fields>
6808                 <links>
6809                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6810                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6811                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6812                 </links>
6813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6814                         <actions>
6815                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6816                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6817                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6818                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6819                         </actions>
6820                 </permacrud>
6821         </class>
6822         <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">
6823                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6824                         <field name="id" reporter:datatype="id" />
6825                         <field name="bucket" reporter:datatype="link"/>
6826                         <field name="note" reporter:datatype="text" />
6827                 </fields>
6828                 <links>
6829                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6830                 </links>
6831         </class>
6832         <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6833                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6834                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6835                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6836                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6837                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6838                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6839                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6840                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6841                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6842                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6843                 </fields>
6844                 <links>
6845                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6846                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6847                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6848                 </links>
6849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6850                         <actions>
6851                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6852                         </actions>
6853                 </permacrud>
6854         </class>
6855         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6856                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6857                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6858                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6859                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6860                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6861                 </fields>
6862                 <links>
6863                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6864                 </links>
6865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866                         <actions>
6867                                 <retrieve permission="VIEW_USER user_request.view">
6868                                         <context link="usr" field="home_ou" />
6869                                 </retrieve>
6870                         </actions>
6871                 </permacrud>
6872         </class>
6873     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
6874         <fields oils_persist:primary="field">
6875             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6876             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6877             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6878         </fields>
6879         <links/>
6880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6881             <actions>
6882                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6883                 <retrieve />
6884                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6885                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6886             </actions>
6887         </permacrud>
6888     </class>
6889         <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
6890                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6891                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6892                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6893                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6894                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6895                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6896                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6897                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6898                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6899                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6900                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6901                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6902                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6903                 </fields>
6904                 <links>
6905                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6906                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6907                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6908                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6909                 </links>
6910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6911             <actions>
6912                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6913                 <retrieve />
6914                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6915                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6916             </actions>
6917         </permacrud>
6918         </class>
6919         <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">
6920                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6921                         <field name="field" reporter:datatype="link"/>
6922                         <field name="id" reporter:datatype="id" />
6923                         <field name="source" reporter:datatype="link"/>
6924                         <field name="value"  reporter:datatype="text"/>
6925                 </fields>
6926                 <links>
6927                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6928                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6929                 </links>
6930         </class>
6931         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6932                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6933                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6934                         <field name="btype" reporter:datatype="text"/>
6935                         <field name="id" reporter:datatype="id" />
6936                         <field name="name"  reporter:datatype="text"/>
6937                         <field name="description" reporter:datatype="text"/>
6938                         <field name="owner" reporter:datatype="link"/>
6939                         <field name="pub" reporter:datatype="bool"/>
6940                         <field name="create_time" reporter:datatype="timestamp" />
6941                         <field name="owning_lib" reporter:datatype="org_unit" />
6942                 </fields>
6943                 <links>
6944                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6945                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6946                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6947                 </links>
6948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6949                         <actions>
6950                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6951                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6952                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6953                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6954                         </actions>
6955                 </permacrud>
6956         </class>
6957         <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">
6958                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6959                         <field name="id" reporter:datatype="id" />
6960                         <field name="bucket" reporter:datatype="link"/>
6961                         <field name="note" reporter:datatype="text" />
6962                 </fields>
6963                 <links>
6964                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6965                 </links>
6966         </class>
6967         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6968                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6969                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6970                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6971                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6972                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6973                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6974                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6975                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6976                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6977                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6978                 </fields>
6979                 <links>
6980                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6981                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6982                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6983                 </links>
6984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6985             <actions>
6986                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6987                     <context link="xact" jump="usr" field="home_ou"/>
6988                 </retrieve>
6989                         </actions>
6990                 </permacrud>
6991         </class>
6992         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6993                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6994                         <field name="id" reporter:datatype="id" />
6995                         <field name="ind1" />
6996                         <field name="ind2" />
6997                         <field name="record" />
6998                         <field name="subfield" />
6999                         <field name="tag" />
7000                         <field name="value" />
7001                 </fields>
7002                 <links>
7003                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7004                 </links>
7005         </class>
7006         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
7007                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7008                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7009                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7010                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7011                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7012                 </fields>
7013                 <links>
7014                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7015                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7016                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7017                 </links>
7018         </class>
7019         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7021                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7022                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7023                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7024                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7025                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7026                 </fields>
7027                 <links>
7028                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7029                 </links>
7030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7031             <actions>
7032                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7033                 <retrieve/>
7034                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7035                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7036             </actions>
7037         </permacrud>
7038
7039         </class>
7040         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
7041                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7042                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7043                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7044                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7045                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7046                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7047                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7048                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7049                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7050                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7051                 </fields>
7052                 <links>
7053                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7054                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7055                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7056                 </links>
7057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7058             <actions>
7059                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7060                 <retrieve/>
7061                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7062                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7063             </actions>
7064         </permacrud>
7065         </class>
7066         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7067                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7068                         <field name="create_date" reporter:datatype="timestamp"/>
7069                         <field name="creator" reporter:datatype="link"/>
7070                         <field name="edit_date" reporter:datatype="timestamp"/>
7071                         <field name="editor" reporter:datatype="link"/>
7072                         <field name="id" reporter:datatype="id" />
7073                         <field name="pub" reporter:datatype="bool"/>
7074                         <field name="record" reporter:datatype="link"/>
7075                         <field name="value"  reporter:datatype="text"/>
7076                 </fields>
7077                 <links>
7078                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7079                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7080                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7081                 </links>
7082         </class>
7083         <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">
7084                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7085                         <field name="balance_owed" reporter:datatype="money" />
7086                         <field name="total_owed" reporter:datatype="money" />
7087                         <field name="total_paid" reporter:datatype="money" />
7088                         <field name="usr" reporter:datatype="link"/>
7089                 </fields>
7090                 <links>
7091                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7092                 </links>
7093         </class>
7094     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7095                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7096                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7097                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7098                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7099                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7100                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7101                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7102                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7106                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7107                 </fields>
7108                 <links>
7109                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7110                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7111                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7112                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7113                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7114                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7115                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7116                 </links>
7117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7118             <actions>
7119                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7120             </actions>
7121         </permacrud>
7122         </class>
7123         <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7125                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7126                         <field name="quality" reporter:datatype="int" />
7127                         <field name="source" reporter:datatype="text"/>
7128                         <field name="transcendant" reporter:datatype="bool"/>
7129                         <field name="can_have_copies" reporter:datatype="bool"/>
7130                 </fields>
7131                 <links/>
7132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7133             <actions>
7134                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7135                 <retrieve/>
7136                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7137                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7138             </actions>
7139         </permacrud>
7140         </class>
7141         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
7142                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7143                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7144                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7145                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7146                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7147                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7148                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7149                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7150                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7151                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7152                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7153                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7154                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7155                 </fields>
7156                 <links>
7157                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7158                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7159                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7160                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7161                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7162                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7163                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7164                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7165                 </links>
7166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7167                         <actions>
7168                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7169                                         <context link="usr" field="home_ou" />
7170                                 </retrieve>
7171                         </actions>
7172                 </permacrud>
7173         </class>
7174         <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">
7175                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7176                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7177                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7178                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7179                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7180                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7181                 </fields>
7182                 <links>
7183                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7184                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7185                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7186                 </links>
7187         </class>
7188         <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
7189                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7190                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7191                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7192                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7193                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7194                 </fields>
7195                 <links>
7196                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7197                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7198                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7199                 </links>
7200         </class>
7201         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
7202                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7203                         <field name="bucket" reporter:datatype="link"/>
7204                         <field name="id" reporter:datatype="id" />
7205                         <field name="target_user" reporter:datatype="link"/>
7206                         <field name="create_time" reporter:datatype="timestamp" />
7207                         <field name="pos" reporter:datatype="int" />
7208                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7209                 </fields>
7210                 <links>
7211                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7212                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7213             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7214                 </links>
7215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7216                         <actions>
7217                                 <retrieve permission="ADMIN_USER_BUCKET">
7218                     <context link="bucket" owning_lib="owning_lib"/>
7219                 </retrieve>
7220             </actions>
7221         </permacrud>
7222         </class>
7223         <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">
7224                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7225                         <field name="id" reporter:datatype="id" />
7226                         <field name="item" reporter:datatype="link"/>
7227                         <field name="note" reporter:datatype="text" />
7228                 </fields>
7229                 <links>
7230                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7231                 </links>
7232         </class>
7233         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7234                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7235                         <field name="balance_owed" reporter:datatype="money" />
7236                         <field name="total_owed" reporter:datatype="money" />
7237                         <field name="total_paid" reporter:datatype="money" />
7238                         <field name="usr" reporter:datatype="link"/>
7239                 </fields>
7240                 <links>
7241                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7242                 </links>
7243         </class>
7244         <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
7245                 <fields oils_persist:primary="code" oils_persist:sequence="">
7246                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7247                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7248                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7249                 </fields>
7250                 <links/>
7251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7252             <actions>
7253                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7254                 <retrieve/>
7255                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7256                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7257             </actions>
7258         </permacrud>
7259         </class>
7260         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
7261                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7262                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7263                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7264                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7265                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7266                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7267                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7268                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7269                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7270                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7271                 </fields>
7272                 <links>
7273                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7274                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7275                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7276                 </links>
7277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7278             <actions>
7279                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7280                     <context link="xact" jump="usr" field="home_ou"/>
7281                 </retrieve>
7282                         </actions>
7283                 </permacrud>
7284         </class>
7285         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7287                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7288                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7289                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7290                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7291                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7292                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7293                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7294                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7295                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7296                 </fields>
7297                 <links>
7298                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7299                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7300                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7301                 </links>
7302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7303             <actions>
7304                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7305                     <context link="xact" jump="usr" field="home_ou"/>
7306                 </retrieve>
7307                         </actions>
7308                 </permacrud>
7309         </class>
7310         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="">
7312                         <field name="checkin_lib" reporter:datatype="link"/>
7313                         <field name="checkin_staff" reporter:datatype="link"/>
7314                         <field name="checkin_time" reporter:datatype="timestamp"/>
7315                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7316                         <field name="circ_staff" reporter:datatype="link"/>
7317                         <field name="desk_renewal" reporter:datatype="bool"/>
7318                         <field name="due_date" reporter:datatype="timestamp"/>
7319                         <field name="duration" reporter:datatype="interval"/>
7320                         <field name="duration_rule" reporter:datatype="link"/>
7321                         <field name="fine_interval" reporter:datatype="interval"/>
7322                         <field name="id" reporter:datatype="id" />
7323                         <field name="max_fine" reporter:datatype="money" />
7324                         <field name="max_fine_rule" reporter:datatype="link"/>
7325                         <field name="opac_renewal" reporter:datatype="bool"/>
7326                         <field name="phone_renewal" reporter:datatype="bool"/>
7327                         <field name="recurring_fine" reporter:datatype="money" />
7328                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7329                         <field name="renewal_remaining" reporter:datatype="int" />
7330             <field name="grace_period" reporter:datatype="interval" />
7331                         <field name="stop_fines" reporter:datatype="text"/>
7332                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7333                         <field name="target_copy" reporter:datatype="link"/>
7334                         <field name="usr" reporter:datatype="link"/>
7335                         <field name="xact_finish" reporter:datatype="timestamp" />
7336                         <field name="xact_start" reporter:datatype="timestamp" />
7337                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7338                 </fields>
7339                 <links>
7340                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7341                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7342                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7343                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7344                 </links>
7345         </class>
7346         <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">
7347                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7348                         <field name="field" reporter:datatype="link"/>
7349                         <field name="id" reporter:datatype="id" />
7350                         <field name="source" reporter:datatype="link"/>
7351                         <field name="value" reporter:datatype="text"/>
7352                 </fields>
7353                 <links>
7354                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7355                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7356                 </links>
7357         </class>
7358         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">
7359                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7360                         <field name="high" reporter:datatype="money" />
7361                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7362                         <field name="low" reporter:datatype="money" />
7363                         <field name="name" reporter:datatype="text"/>
7364                         <field name="normal" reporter:datatype="money" />
7365                         <field name="recurrence_interval" reporter:datatype="interval"/>
7366             <field name="grace_period" reporter:datatype="interval" />
7367                 </fields>
7368                 <links/>
7369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7370             <actions>
7371                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7372                 <retrieve/>
7373                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7374                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7375             </actions>
7376         </permacrud>
7377         </class>
7378         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
7379                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7380                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7381                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7382                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7383                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7384                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7385                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7386                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7387                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7388                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7389                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7390                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7391                 </fields>
7392                 <links>
7393                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7394                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7395                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7396                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7397                 </links>
7398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7399             <actions>
7400                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7401                     <context link="xact" jump="usr" field="home_ou"/>
7402                 </retrieve>
7403                         </actions>
7404                 </permacrud>
7405         </class>
7406         <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">
7407                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7408                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7409                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7410                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7411                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7412                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7413                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7414                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7415                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7416                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7417                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7418                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7419                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7420                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7421                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7422                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7423                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7424                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7425                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7426                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7427                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7428                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7429                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7430                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7431                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7432                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7433                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7434                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7435                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7436                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7437                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7438                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7439                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7440                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7441                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7443                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7444                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7445                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7446                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7447                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7448                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7449                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7450                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7451                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7452                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7453                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7454                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7455                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7456                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7457                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7458                 </fields>
7459                 <links>
7460                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7461                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7462                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7463                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7464                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7465                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7466                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7467                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7468                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7469                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7470                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7471                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7472                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7473                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7474                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7475                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7476                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7477                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7478                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7479                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7480                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7481                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7482                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7483                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7484                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7485                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7486                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7487                 </links>
7488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7489             <actions>
7490                 <create permission="CREATE_COPY">
7491                     <context link="call_number" field="owning_lib"/>
7492                 </create>
7493                 <retrieve/>
7494                 <update permission="UPDATE_COPY">
7495                     <context link="call_number" field="owning_lib"/>
7496                 </update>
7497                 <delete permission="DELETE_COPY">
7498                     <context link="call_number" field="owning_lib"/>
7499                 </delete>
7500             </actions>
7501         </permacrud>
7502         </class>
7503
7504         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
7505                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7506             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7507                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7508                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7509                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7510                 </fields>
7511                 <links>
7512                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7513                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7514                 </links>
7515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7516             <actions>
7517                                 <create/>
7518                                 <retrieve/>
7519                                 <update/>
7520                                 <delete/>
7521             </actions>
7522         </permacrud>
7523         </class>
7524
7525         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7526                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7527                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7528                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7529                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7530                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7531                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7532                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7533                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7534                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7535                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7536                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7537                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7538                 </fields>
7539                 <links>
7540                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7541                 </links>
7542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7543             <actions>
7544                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7545                 <retrieve/>
7546                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7547                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7548             </actions>
7549         </permacrud>
7550         </class>
7551
7552         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7553                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7554                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7555                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7556                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7557                 </fields>
7558                 <links>
7559                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7560                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7561                 </links>
7562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7563             <actions>
7564                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7565                 <retrieve/>
7566                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7567                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7568             </actions>
7569         </permacrud>
7570         </class>
7571
7572         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7573                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7574                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7575                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7576                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7577                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7578                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7579                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7580                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7581                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7582                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7583                 </fields>
7584                 <links>
7585                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7586                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7587                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7588                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7589                 </links>
7590         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7591             <actions>
7592                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7593                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7594                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7595                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7596             </actions>
7597         </permacrud>
7598         </class>
7599
7600         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7601                 <fields oils_persist:primary="id">
7602                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7603                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7604                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7605                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7606                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7607                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7608                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7609                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7610                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7611                 </fields>
7612                 <links>
7613                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7614                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7615                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7616                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7617                 </links>
7618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7619             <actions>
7620                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7621                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7622                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7623                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7624             </actions>
7625         </permacrud>
7626         </class>
7627
7628         <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
7629                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7630                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7631                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7632                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7633                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7634                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7635                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7636                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7637                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7638                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7639                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7640                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7641                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7642                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7643                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7644                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7645                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7646                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7647                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7648                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7649                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7650                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7651                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7652                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7653                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7654                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7655                 </fields>
7656                 <links>
7657                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7658                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7659                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7660                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7661                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7662                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7663                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7664                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7665                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7666                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7667                 </links>
7668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7669                         <actions>
7670                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7671                                 <retrieve />
7672                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7673                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7674                         </actions>
7675                 </permacrud>
7676         </class>
7677
7678         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
7679                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7680                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7681                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7682                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7683                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7684                 </fields>
7685                 <links/>
7686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7687             <actions>
7688                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7689                 <retrieve/>
7690                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7691                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7692             </actions>
7693         </permacrud>
7694         </class>
7695         <class id="crmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine" reporter:label="Max Fine Rule">
7696                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7697                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7698                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7699                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7700                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7701                 </fields>
7702                 <links/>
7703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7704             <actions>
7705                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7706                 <retrieve/>
7707                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7708                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7709             </actions>
7710         </permacrud>
7711         </class>
7712         <class id="pgt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree" reporter:label="Permission Group">
7713                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7714                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7715                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7716                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7717                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7718                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7719                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7720                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7721                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7722                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7723                 </fields>
7724                 <links>
7725                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7726                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7727                 </links>
7728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7729             <actions>
7730                 <create permission="CREATE_PERM" global_required="true"/>
7731                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7732                 <update permission="UPDATE_PERM" global_required="true"/>
7733                 <delete permission="DELETE_PERM" global_required="true"/>
7734             </actions>
7735         </permacrud>
7736         </class>
7737         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7738                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7739                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7740                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7741                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7742                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7743                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7744                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7745                 </fields>
7746                 <links>
7747                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7748                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7749                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7750                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7751                 </links>
7752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7753                         <actions>
7754                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7755                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7756                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7757                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7758                         </actions>
7759                 </permacrud>
7760         </class>
7761         <class id="asva" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_answer" oils_persist:tablename="action.survey_answer" reporter:label="Survey Answer">
7762                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7763                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7764                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7765                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7766                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7767                 </fields>
7768                 <links>
7769                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7770                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7771                 </links>
7772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7773             <actions>
7774                 <create permission="ADMIN_SURVEY">
7775                     <context link="question" jump="survey" field="owner"/>
7776                 </create>
7777                 <retrieve/>
7778                 <update permission="ADMIN_SURVEY">
7779                     <context link="question" jump="survey" field="owner"/>
7780                 </update>
7781                 <delete permission="ADMIN_SURVEY">
7782                     <context link="question" jump="survey" field="owner"/>
7783                 </delete>
7784             </actions>
7785         </permacrud>
7786         </class>
7787         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7789                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7790                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7791                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7792                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7793                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7794                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7795                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7796                 </fields>
7797                 <links>
7798                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7799                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7800                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7801                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7802                 </links>
7803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7804                         <actions>
7805                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7806                         </actions>
7807                 </permacrud>
7808         </class>
7809         <class id="moucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_circulation_summary" oils_persist:tablename="money.open_usr_circulation_summary" reporter:label="Open User Circulation Summary">
7810                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7811                         <field name="balance_owed" reporter:datatype="money" />
7812                         <field name="total_owed" reporter:datatype="money" />
7813                         <field name="total_paid" reporter:datatype="money" />
7814                         <field name="usr" reporter:datatype="link"/>
7815                 </fields>
7816                 <links>
7817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7818                 </links>
7819         </class>
7820         <class id="aufh" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list" reporter:label="Unfulfilled Hold Targets">
7821                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7822                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7823                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7824                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7825                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7826                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7827                 </fields>
7828                 <links>
7829                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7830                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7831                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7832                 </links>
7833         </class>
7834         <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
7835                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7836                         <field name="field" reporter:datatype="link"/>
7837                         <field name="id" reporter:datatype="id" />
7838                         <field name="source" reporter:datatype="link"/>
7839                         <field name="value" reporter:datatype="text"/>
7840                 </fields>
7841                 <links>
7842                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7843                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7844                 </links>
7845         </class>
7846         <class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">
7847                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7848                         <field name="field" reporter:datatype="link"/>
7849                         <field name="id" reporter:datatype="id" />
7850                         <field name="source" reporter:datatype="link"/>
7851                         <field name="value" reporter:datatype="text"/>
7852                 </fields>
7853                 <links>
7854                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7855                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7856                 </links>
7857         </class>
7858         <class id="actscecm" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_user_map" oils_persist:tablename="actor.stat_cat_entry_usr_map"  reporter:label="User Statistical Category Entry">
7859                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7860                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7861                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7862                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7863                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7864                 </fields>
7865                 <links>
7866                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7867                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7868                 </links>
7869         </class>
7870         <class id="pgpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_perm_map" oils_persist:tablename="permission.grp_perm_map" reporter:label="Group Permission Map">
7871                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7872                         <field name="depth" reporter:datatype="int" />
7873                         <field name="grantable" reporter:datatype="bool"/>
7874                         <field name="grp" reporter:datatype="link"/>
7875                         <field name="id" reporter:datatype="id" />
7876                         <field name="perm" reporter:datatype="link"/>
7877                 </fields>
7878                 <links>
7879                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7880                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7881                 </links>
7882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7883             <actions>
7884                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7885                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7886                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7887                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7888             </actions>
7889         </permacrud>
7890         </class>
7891         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7892                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7893                         <field name="items" oils_persist:virtual="true" />
7894                         <field name="btype" reporter:datatype="text"/>
7895                         <field name="id" reporter:datatype="id" />
7896                         <field name="name" reporter:datatype="text"/>
7897                         <field name="description" reporter:datatype="text"/>
7898                         <field name="owner" reporter:datatype="link"/>
7899                         <field name="pub" reporter:datatype="bool"/>
7900                         <field name="create_time" reporter:datatype="timestamp" />
7901                         <field name="owning_lib" reporter:datatype="org_unit" />
7902                 </fields>
7903                 <links>
7904                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7905                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7906                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7907                 </links>
7908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7909                         <actions>
7910                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7911                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7912                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7913                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7914                         </actions>
7915                 </permacrud>
7916         </class>
7917         <class id="ccbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_note" oils_persist:tablename="container.copy_bucket_note" reporter:label="Copy Bucket Note">
7918                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7919                         <field name="id" reporter:datatype="id" />
7920                         <field name="bucket" reporter:datatype="link"/>
7921                         <field name="note" reporter:datatype="text" />
7922                 </fields>
7923                 <links>
7924                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7925                 </links>
7926         </class>
7927         <class id="puwoum" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_work_ou_map" oils_persist:tablename="permission.usr_work_ou_map" reporter:label="User Work Org Unit Map">
7928                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7929                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7930                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7931                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7932                 </fields>
7933                 <links>
7934                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7935                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7936                 </links>
7937         </class>
7938         <class id="pupm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_perm_map" oils_persist:tablename="permission.usr_perm_map" reporter:label="User Permission Map">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7940                         <field name="depth" reporter:datatype="int"/>
7941                         <field name="grantable" reporter:datatype="bool"/>
7942                         <field name="id" reporter:datatype="id" />
7943                         <field name="perm" reporter:datatype="link"/>
7944                         <field name="usr" reporter:datatype="link"/>
7945                 </fields>
7946                 <links>
7947                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7948                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7949                 </links>
7950         </class>
7951         <class id="puopm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_object_perm_map" oils_persist:tablename="permission.usr_object_perm_map" reporter:label="User Object Permission Map">
7952                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7953                         <field name="object_id" reporter:datatype="text"/>
7954                         <field name="grantable" reporter:datatype="bool"/>
7955                         <field name="id" reporter:datatype="id" />
7956                         <field name="perm" reporter:datatype="link"/>
7957                         <field name="usr" reporter:datatype="link"/>
7958                         <field name="object_type" reporter:datatype="text"/>
7959                 </fields>
7960                 <links>
7961                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7962                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7963                 </links>
7964         </class>
7965         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7966                 <fields oils_persist:primary="id" oils_persist:sequence="">
7967                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7968                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7969                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7970                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7971                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7972                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7973                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7974                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7975                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7976                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7977                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7980                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7981                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7982                 </fields>
7983                 <links>
7984                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7985                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7986                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7987                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7988                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7989                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7990                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7991                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7992                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7993                 </links>
7994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7995             <actions>
7996                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7997                     <context link="xact" jump="usr" field="home_ou"/>
7998                 </retrieve>
7999                         </actions>
8000                 </permacrud>
8001         </class>
8002         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8003                 <fields oils_persist:primary="id" oils_persist:sequence="">
8004                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8005                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8006                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8007                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8008                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8009                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8010                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8011                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8012                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8013                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8014                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8015                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8016                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8017                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8018                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8019                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8020                 </fields>
8021                 <links>
8022                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8023                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8024                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8025                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8026                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8027                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8028                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8029                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8030                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8031                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8032                 </links>
8033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8034                         <actions>
8035                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8036                                         <context link="xact" jump="usr" field="home_ou"/>
8037                                 </retrieve>
8038                         </actions>
8039                 </permacrud>
8040         </class>
8041         <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">
8042                 <fields oils_persist:primary="id" oils_persist:sequence="">
8043                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8044                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8045                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8046                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8047                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8048                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8049                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8050                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8051                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8052                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8053                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8054                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8055                 </fields>
8056                 <links>
8057                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8058                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8059                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8060                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8061                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8062                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8063                 </links>
8064         </class>
8065         <class id="mdp" controller="open-ils.cstore" oils_obj:fieldmapper="money::desk_payment" oils_persist:tablename="money.desk_payment_view" reporter:core="true" reporter:label="Payments: Desk">
8066                 <fields oils_persist:primary="id" oils_persist:sequence="">
8067                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8068                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8069                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8070                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8071                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8072                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8073                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8074                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8075                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8076                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8077                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8078                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8079                 </fields>
8080                 <links>
8081                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8082                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8083                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8084                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8085                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8086                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8087                 </links>
8088         </class>
8089         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
8090                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8091                         <field name="bucket" reporter:datatype="link"/>
8092                         <field name="id" reporter:datatype="id" />
8093                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8094                         <field name="create_time" reporter:datatype="timestamp" />
8095                         <field name="pos" reporter:datatype="int" />
8096                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8097                 </fields>
8098                 <links>
8099                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8100                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8101             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8102                 </links>
8103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8104                         <actions>
8105                                 <retrieve permission="ADMIN_COPY_BUCKET">
8106                     <context link="bucket" owning_lib="owning_lib"/>
8107                 </retrieve>
8108             </actions>
8109         </permacrud>
8110         </class>
8111         <class id="cbrebin" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item_note" oils_persist:tablename="container.biblio_record_entry_bucket_item_note" reporter:label="Biblio Record Entry Bucket Item Note">
8112                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8113                         <field name="id" reporter:datatype="id" />
8114                         <field name="item" reporter:datatype="link"/>
8115                         <field name="note" reporter:datatype="text" />
8116                 </fields>
8117                 <links>
8118                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8119                 </links>
8120         </class>
8121         <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
8122                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8123                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8124                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8125                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8126                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8127                 </fields>
8128                 <links>
8129                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8130                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8131                 </links>
8132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8133                         <actions>
8134                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8135                         </actions>
8136                 </permacrud>
8137         </class>
8138     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
8139         <fields oils_persist:primary="field">
8140             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8141             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8142             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8143         </fields>
8144         <links/>
8145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8146             <actions>
8147                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8148                 <retrieve />
8149                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8150                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8151             </actions>
8152         </permacrud>
8153     </class>
8154         <class id="ahrcc" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_cancel_cause" oils_persist:tablename="action.hold_request_cancel_cause" oils_persist:restrict_primary="100" reporter:label="Hold Request Cancel Cause">
8155                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8156                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8157                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8158                 </fields>
8159                 <links/>
8160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161             <actions>
8162                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8163                 <retrieve/>
8164                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8165                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8166             </actions>
8167         </permacrud>
8168         </class>
8169
8170
8171         <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">
8172                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8173                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8174                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8175                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8176                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8177                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8178                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8179                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8180                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8181                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8182                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8183                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8184                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8185                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8186                 </fields>
8187                 <links>
8188                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8189                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8190                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8191                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8192                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8193                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8194                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8195                 </links>
8196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8197             <actions>
8198                 <create permission="TRANSIT_COPY">
8199                     <context link="target_copy" field="owner"/>
8200                 </create>
8201                 <retrieve/>
8202                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8203                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8204             </actions>
8205         </permacrud>
8206         </class>
8207         <class id="ahtc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy" reporter:core="true" reporter:label="Hold Transit">
8208                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8209                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8210                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8211                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8212                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8213                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8214                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8215                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8216                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8217                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8218                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8219                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8220                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8221                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8222                 </fields>
8223                 <links>
8224                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8225                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8226                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8227                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8228                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8229                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8230                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8231                 </links>
8232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8233             <actions>
8234                 <create permission="TRANSIT_COPY" context_field="owner">
8235                     <context link="target_copy" field="circ_lib"/>
8236                 </create>
8237                 <retrieve/>
8238                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8239                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8240             </actions>
8241         </permacrud>
8242         </class>
8243         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
8244                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8245                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8246                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8247                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8248                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8249                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8250                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8251                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8252                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8253                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8254                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8255                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8256                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8257                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8258                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8259                 </fields>
8260                 <links>
8261                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8262                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8263                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8264                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8265                 </links>
8266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8267             <actions>
8268                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8269                     <context link="xact" jump="usr" field="home_ou"/>
8270                 </retrieve>
8271                         </actions>
8272                 </permacrud>
8273         </class>
8274         <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">
8275                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8276                         <field name="grp" />
8277                         <field name="id" reporter:datatype="id" />
8278                         <field name="usr" />
8279                 </fields>
8280                 <links>
8281                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8282                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8283                 </links>
8284         </class>
8285         <class id="i18n" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_core" oils_persist:tablename="config.i18n_core" oils_persist:field_safe="true" reporter:label="i18n Core">
8286                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8287                         <field name="id" reporter:datatype="id" />
8288                         <field name="fq_field" reporter:datatype="text"/>
8289                         <field name="identity_value" reporter:datatype="text"/>
8290                         <field name="translation" reporter:datatype="text"/>
8291                         <field name="string" reporter:datatype="text"/>
8292                 </fields>
8293                 <links>
8294                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8295                 </links>
8296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8297             <actions>
8298                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8299                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8300                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8301                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8302             </actions>
8303         </permacrud>
8304         </class>
8305         <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
8306                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8307                         <field name="id" reporter:datatype="id" />
8308                         <field name="fm_class" reporter:datatype="text"/>
8309                         <field name="field" reporter:datatype="text"/>
8310                         <field name="owner" reporter:datatype="org_unit"/>
8311                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8312                 </fields>
8313                 <links>
8314                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8315                 </links>
8316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8317             <actions>
8318                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8319                 <retrieve/>
8320                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8321                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8322             </actions>
8323         </permacrud>
8324         </class>
8325         <class id="i18n_l" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_locale" oils_persist:tablename="config.i18n_locale" oils_persist:field_safe="true" reporter:label="Locale">
8326                 <fields oils_persist:primary="code">
8327                         <field name="code" reporter:datatype="id" />
8328                         <field name="marc_code" reporter:datatype="text"/>
8329                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8330                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8331                         <field name="rtl" reporter:datatype="bool"/>
8332                 </fields>
8333                 <links/>
8334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8335             <actions>
8336                 <create permission="CREATE_LOCALE" global_required="true"/>
8337                 <retrieve/>
8338                 <update permission="UPDATE_LOCALE" global_required="true"/>
8339                 <delete permission="DELETE_LOCALE" global_required="true"/>
8340             </actions>
8341         </permacrud>
8342         </class>
8343         <class id="cbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::billing_type" oils_persist:tablename="config.billing_type" oils_persist:restrict_primary="100" reporter:label="Billing Type">
8344                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8345                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8346                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8347                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8348             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8349                 </fields>
8350                 <links>
8351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8352                 </links>
8353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8354             <actions>
8355                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8356                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8357                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8358                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8359             </actions>
8360         </permacrud>
8361         </class>
8362
8363         <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">
8364                 <fields oils_persist:primary="id">
8365                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8366                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8367                 </fields>
8368                 <links/>
8369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8370             <actions>
8371                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8372                 <retrieve/>
8373                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8374                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8375             </actions>
8376         </permacrud>
8377         </class>
8378
8379         <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">
8380                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8381                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8382                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8383                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8384                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8385                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8386                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8387                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8388                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8389                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8390                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8391                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8392                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8393                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8394                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8395                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8396                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8397                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8398                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8399                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8400                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8401                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8402                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8403                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8404                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8405                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8406                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8407                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8408                 </fields>
8409                 <links>
8410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8411                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8412                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8413                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8414                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8415                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8416                 </links>
8417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418             <actions>
8419                 <create permission="user_request.create">
8420                     <context link="usr" field="home_ou"/>
8421                                 </create>
8422                 <retrieve permission="user_request.view">
8423                     <context link="usr" field="home_ou"/>
8424                                 </retrieve>
8425                 <update permission="user_request.update">
8426                     <context link="usr" field="home_ou"/>
8427                                 </update>
8428                 <delete permission="user_request.delete">
8429                     <context link="usr" field="home_ou"/>
8430                                 </delete>
8431             </actions>
8432         </permacrud>
8433         </class>
8434
8435         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
8436         <oils_persist:source_definition><![CDATA[
8437             SELECT r.*, CASE
8438                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8439                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8440                         WHEN l.state = 'received' THEN 5 -- Received
8441                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8442                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8443                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8444                         WHEN l.id IS NULL THEN 1 -- New
8445                         ELSE 0 -- Error
8446                     END AS request_status
8447                     ,u.home_ou
8448             FROM      acq.user_request r
8449             JOIN actor.usr u ON (r.usr = u.id)
8450             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8451             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8452             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8453         ]]></oils_persist:source_definition>
8454                 <fields oils_persist:primary="id">
8455                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8456                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8457                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8458                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8459                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8460                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8461                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8462                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8463                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8464                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8465                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8466                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8467                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8468                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8469                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8470                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8471                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8472                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8473                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8474                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8475                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8476                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8477                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8478                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8479                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8480                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8481                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8482                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8483                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8484                 </fields>
8485                 <links>
8486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8487                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8488                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8489                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8490                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8491                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8492                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8493                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8494                 </links>
8495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8496             <actions>
8497                 <retrieve permission="user_request.view">
8498                     <context link="usr" field="home_ou"/>
8499                                 </retrieve>
8500             </actions>
8501         </permacrud>
8502         </class>
8503
8504         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
8505                 <fields oils_persist:primary="id">
8506                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8507                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8508                 </fields>
8509                 <links/>
8510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8511             <actions>
8512                 <retrieve/>
8513             </actions>
8514         </permacrud>
8515         </class>
8516
8517         <class id="acqct" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::currency_type" oils_persist:tablename="acq.currency_type" reporter:label="Currency Type">
8518                 <fields oils_persist:primary="code">
8519                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8520                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8521                 </fields>
8522                 <links/>
8523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8524             <actions>
8525                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8526                 <retrieve/>
8527                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8528                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8529             </actions>
8530         </permacrud>
8531         </class>
8532
8533         <class id="acqexr" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::exchange_rate" oils_persist:tablename="acq.exchange_rate" reporter:label="Exchange Rate">
8534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8535                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8536                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8537                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8538                         <field reporter:label="Ratio" name="ratio" />
8539                 </fields>
8540                 <links>
8541                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8542                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8543                 </links>
8544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8545                         <actions>
8546                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8547                                 <retrieve/>
8548                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8549                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8550                         </actions>
8551                 </permacrud>
8552         </class>
8553
8554         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8556                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8557                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8558                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8559                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8560                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8561                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8562                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8563                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8564                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8565                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8566                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8567                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8568                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8569                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8570                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8571                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8572                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8573                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8574                 </fields>
8575                 <links>
8576                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8577                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8578             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8579             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8580                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8581                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8582                 </links>
8583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8584             <actions>
8585                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8586                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8587                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8588                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8589             </actions>
8590         </permacrud>
8591         </class>
8592
8593         <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">
8594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8595                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8596                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8597                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8598                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8599                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8600                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8601                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8602                 </fields>
8603                 <links>
8604                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8605                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8606                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8607                 </links>
8608         </class>
8609
8610         <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
8611                 <fields oils_persist:primary="code">
8612                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8613                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8614                 </fields>
8615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8616             <actions>
8617                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8618                 <retrieve/>
8619                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8620                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8621             </actions>
8622                 </permacrud>
8623         </class>
8624
8625         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8626                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8627                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8628                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8629                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8630                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8631                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8632                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8633                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8634                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8635                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8636                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8637                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8638                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8639                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8640                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8641                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8642                 </fields>
8643                 <links>
8644                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8645                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8646                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8647                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8648                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8649                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8650                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8651                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8652                 </links>
8653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8654             <actions>
8655                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8656                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8657                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8658                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8659             </actions>
8660         </permacrud>
8661         </class>
8662
8663         <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">
8664                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8665                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8666                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8667                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8668                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8669                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8670                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8671                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8672                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8673                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8674                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8675                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8676                 </fields>
8677                 <links>
8678                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8679                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8680                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8681                 </links>
8682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8683             <actions>
8684                 <create   permission="ADMIN_INVOICE">
8685                                         <context link="invoice" field="receiver"/>
8686                                 </create>
8687                 <retrieve permission="ADMIN_INVOICE">
8688                                         <context link="invoice" field="receiver"/>
8689                                 </retrieve>
8690                 <update   permission="ADMIN_INVOICE">
8691                                         <context link="invoice" field="receiver"/>
8692                                 </update>
8693                                 <delete   permission="ADMIN_INVOICE">
8694                                         <context link="invoice" field="receiver"/>
8695                                 </delete>
8696             </actions>
8697         </permacrud>
8698         </class>
8699
8700         <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">
8701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8702                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8703                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8704                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8705                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8706                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8707                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8708                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8709                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8710                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8711                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8712                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8713                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8714                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8715                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8716                 </fields>
8717                 <links>
8718                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8719                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8720                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8721                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8722                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8723                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8724                 </links>
8725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8726             <actions>
8727                 <create   permission="ADMIN_INVOICE">
8728                                         <context link="invoice" field="receiver"/>
8729                                 </create>
8730                 <retrieve permission="ADMIN_INVOICE">
8731                                         <context link="invoice" field="receiver"/>
8732                                 </retrieve>
8733                 <update   permission="ADMIN_INVOICE">
8734                                         <context link="invoice" field="receiver"/>
8735                                 </update>
8736                                 <delete   permission="ADMIN_INVOICE">
8737                                         <context link="invoice" field="receiver"/>
8738                                 </delete>
8739             </actions>
8740         </permacrud>
8741         </class>
8742
8743         <class id="acqpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_address" oils_persist:tablename="acq.provider_address" reporter:label="Provider Address">
8744                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8745                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8746                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8747                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8748                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8749                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8750                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8751                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8752                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8753                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8754                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8755                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8756                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8757                 </fields>
8758                 <links>
8759                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8760                 </links>
8761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8762             <actions>
8763                 <create permission="ADMIN_PROVIDER">
8764                     <context link="provider" field="owner"/>
8765                 </create>
8766                 <retrieve permission="ADMIN_PROVIDER">
8767                     <context link="provider" field="owner"/>
8768                 </retrieve>
8769                 <update permission="ADMIN_PROVIDER">
8770                     <context link="provider" field="owner"/>
8771                 </update>
8772                 <delete permission="ADMIN_PROVIDER">
8773                     <context link="provider" field="owner"/>
8774                 </delete>
8775             </actions>
8776         </permacrud>
8777         </class>
8778
8779         <class id="acqpc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact" oils_persist:tablename="acq.provider_contact" reporter:label="Provider Contact">
8780                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8781                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8782                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8783                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8784                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8785                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8786                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8787         </fields>
8788                 <links>
8789                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8790                 </links>
8791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8792             <actions>
8793                 <create permission="ADMIN_PROVIDER">
8794                     <context link="provider" field="owner"/>
8795                 </create>
8796                 <retrieve permission="ADMIN_PROVIDER">
8797                     <context link="provider" field="owner"/>
8798                 </retrieve>
8799                 <update permission="ADMIN_PROVIDER">
8800                     <context link="provider" field="owner"/>
8801                 </update>
8802                 <delete permission="ADMIN_PROVIDER">
8803                     <context link="provider" field="owner"/>
8804                 </delete>
8805             </actions>
8806         </permacrud>
8807     </class>
8808         <class id="acqpca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact_address" oils_persist:tablename="acq.provider_contact_address" reporter:label="Provider Contact Address">
8809                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8810                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8811                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8812                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8813                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8814                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8815                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8816                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8817                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8818                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8819                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8820                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8821                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8822                 </fields>
8823                 <links>
8824                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8825                 </links>
8826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8827             <actions>
8828                 <create permission="ADMIN_PROVIDER">
8829                     <context link="contact" jump='provider' field="owner"/>
8830                 </create>
8831                 <retrieve permission="ADMIN_PROVIDER">
8832                     <context link="contact" jump='provider' field="owner"/>
8833                 </retrieve>
8834                 <update permission="ADMIN_PROVIDER">
8835                     <context link="contact" jump='provider' field="owner"/>
8836                 </update>
8837                 <delete permission="ADMIN_PROVIDER">
8838                     <context link="contact" jump='provider' field="owner"/>
8839                 </delete>
8840             </actions>
8841         </permacrud>
8842         </class>
8843
8844         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8845                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8846                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8847                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8848                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8849                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8850                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8851                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8852                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8853                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8854                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8855                 </fields>
8856                 <links>
8857                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8858                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8859                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8860                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8861                 </links>
8862         </class>
8863
8864         <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
8865                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8866                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8867                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8868                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8869                 </fields>
8870                 <links>
8871             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8872                 </links>
8873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8874                         <actions>
8875                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8876                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8877                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8878                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8879                         </actions>
8880                 </permacrud>
8881         </class>
8882
8883         <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
8884                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8885                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8886                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8887                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8888                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8889                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8890                 </fields>
8891                 <links>
8892                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8893                 </links>
8894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8895                         <actions>
8896                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8897                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8898                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8899                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8900                         </actions>
8901                 </permacrud>
8902         </class>
8903
8904         <class id="acqfs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source" oils_persist:tablename="acq.funding_source" reporter:label="Funding Source">
8905                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8906                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8907                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8908                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8909                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8910                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8911                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8912                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8913                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8914                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8915                 </fields>
8916                 <links>
8917                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8918                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8919             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8920             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8921                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8922                 </links>
8923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8924             <actions>
8925                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8926                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8927                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8928                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8929             </actions>
8930         </permacrud>
8931         </class>
8932
8933         <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
8934                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8935                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8936                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8937                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8938                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8939                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8940                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8941                 </fields>
8942                 <links>
8943                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8944                 </links>
8945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8946                         <actions>
8947                                 <create permission="ADMIN_FUNDING_SOURCE">
8948                     <context link="funding_source" field="owner"/>
8949                 </create>
8950                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8951                     <context link="funding_source" field="owner"/>
8952                 </retrieve>
8953                                 <update permission="ADMIN_FUNDING_SOURCE">
8954                     <context link="funding_source" field="owner"/>
8955                 </update>
8956                                 <delete permission="ADMIN_FUNDING_SOURCE">
8957                     <context link="funding_source" field="owner"/>
8958                 </delete>
8959                         </actions>
8960                 </permacrud>
8961         </class>
8962
8963         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
8964                 <fields oils_persist:primary="id">
8965                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8966                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8967                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8968                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8969                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8970                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8971                 </fields>
8972                 <links>
8973                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8974                 </links>
8975         </class>
8976
8977         <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
8978                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8979                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8980                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8981                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8982                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8983                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8984                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8985                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8986                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8987                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8988                 </fields>
8989                 <links>
8990                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8991                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8992                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8993                 </links>
8994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8995                         <actions>
8996                                 <create permission="ADMIN_ACQ_FUND">
8997                     <context link="fund" field="org"/>
8998                 </create>
8999                                 <retrieve permission="ADMIN_ACQ_FUND">
9000                     <context link="fund" field="org"/>
9001                 </retrieve>
9002                                 <update permission="ADMIN_ACQ_FUND">
9003                     <context link="fund" field="org"/>
9004                 </update>
9005                                 <delete permission="ADMIN_ACQ_FUND">
9006                     <context link="fund" field="org"/>
9007                 </delete>
9008                         </actions>
9009                 </permacrud>
9010         </class>
9011
9012         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9013                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9014                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9015                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9016                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9017                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9018                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9019                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9020                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9021                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9022                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9023                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9024                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9025                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9026                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9027                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9028                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9029                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9030                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9031                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9032                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9033                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9034                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9035                 </fields>
9036                 <links>
9037                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9038                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9039             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9040             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9041             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9042             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9043             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9044             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9045             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9046             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9047             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9048                 </links>
9049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9050             <actions>
9051                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9052                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9053                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9054                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9055             </actions>
9056         </permacrud>
9057         </class>
9058
9059         <class id="acqfat" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
9060                 <fields oils_persist:primary="fund">
9061                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9062                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9063                 </fields>
9064                 <links>
9065                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9066                 </links>
9067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9068             <actions>
9069                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9070                                         <context link="fund" field="org" />
9071                 </retrieve>
9072             </actions>
9073         </permacrud>
9074         </class>
9075
9076         <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
9077                 <fields oils_persist:primary="fund">
9078                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9079                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9080                 </fields>
9081                 <links>
9082                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9083                 </links>
9084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9085             <actions>
9086                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9087                                         <context link="fund" field="org" />
9088                 </retrieve>
9089             </actions>
9090         </permacrud>
9091         </class>
9092
9093         <class id="acqfet" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
9094                 <fields oils_persist:primary="fund">
9095                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9096                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9097                 </fields>
9098                 <links>
9099                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9100                 </links>
9101         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9102             <actions>
9103                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9104                                         <context link="fund" field="org" />
9105                 </retrieve>
9106             </actions>
9107         </permacrud>
9108         </class>
9109
9110         <class id="acqfst" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
9111                 <fields oils_persist:primary="fund">
9112                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9113                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9114                 </fields>
9115                 <links>
9116                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9117                 </links>
9118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9119             <actions>
9120                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9121                                         <context link="fund" field="org" />
9122                 </retrieve>
9123             </actions>
9124         </permacrud>
9125         </class>
9126
9127         <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
9128                 <fields oils_persist:primary="fund">
9129                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9130                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9131                 </fields>
9132                 <links>
9133                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9134                 </links>
9135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9136             <actions>
9137                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9138                                         <context link="fund" field="org" />
9139                 </retrieve>
9140             </actions>
9141         </permacrud>
9142         </class>
9143
9144    <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">
9145         <fields oils_persist:primary="fund">
9146             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9147             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9148         </fields>
9149         <links>
9150             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9151         </links>
9152     </class>
9153
9154    <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">
9155         <fields oils_persist:primary="fund">
9156             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9157             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9158         </fields>
9159         <links>
9160             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9161         </links>
9162     </class>
9163
9164    <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">
9165         <fields oils_persist:primary="fund">
9166             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9167             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9168         </fields>
9169         <links>
9170             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9171         </links>
9172     </class>
9173
9174    <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">
9175         <fields oils_persist:primary="fund">
9176             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9177             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9178         </fields>
9179         <links>
9180             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9181         </links>
9182     </class>
9183
9184    <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">
9185         <fields oils_persist:primary="fund">
9186             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9187             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9188         </fields>
9189         <links>
9190             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9191         </links>
9192     </class>
9193
9194         <class id="acqfsrcct" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_credit_total" reporter:label="Total Credit to Funding Source">
9195                 <fields oils_persist:primary="funding_source">
9196                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9197                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9198                 </fields>
9199                 <links>
9200                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9201                 </links>
9202         </class>
9203
9204         <class id="acqfsrcat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_allocation_total" reporter:label="Total Allocation to Funding Source">
9205                 <fields oils_persist:primary="funding_source">
9206                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9207                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9208                 </fields>
9209                 <links>
9210                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9211                 </links>
9212         </class>
9213
9214         <class id="acqfsrcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_balance" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_balance" reporter:label="Funding Source Balance">
9215                 <fields oils_persist:primary="funding_source">
9216                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9217                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9218                 </fields>
9219                 <links>
9220                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9221                 </links>
9222         </class>
9223
9224         <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
9225                 <fields oils_persist:primary="fund">
9226                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9227                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9228                 </fields>
9229                 <links>
9230                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9231                 </links>
9232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9233             <actions>
9234                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9235                                         <context link="fund" field="org" />
9236                 </retrieve>
9237             </actions>
9238         </permacrud>
9239     </class>
9240     <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">
9241         <oils_persist:source_definition><![CDATA[
9242             SELECT
9243                 acqf.*,
9244                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9245                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9246                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9247                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9248             FROM
9249                 acq.fund acqf
9250                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9251                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9252                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9253                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9254         ]]></oils_persist:source_definition>
9255         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9256             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9257             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9258             <field reporter:label="Name" name="name" reporter:datatype="text" />
9259             <field reporter:label="Year" name="year" reporter:datatype="int" />
9260             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9261             <field reporter:label="Code" name="code" reporter:datatype="text" />
9262             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9263             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9264             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9265             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9266             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9267
9268             <!-- non fund-native fields -->
9269             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9270             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9271             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9272             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9273         </fields>
9274         <links>
9275             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9276             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9277             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9278         </links>
9279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9280             <actions>
9281                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9282             </actions>
9283         </permacrud>
9284         </class>
9285         <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
9286                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9287                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9288                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9289                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9290                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9291                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9292                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9293                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9294                 </fields>
9295                 <links>
9296                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9297                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9298                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9299                 </links>
9300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9301                         <actions>
9302                                 <create permission="ADMIN_ACQ_FUND">
9303                     <context link="fund" field="org"/>
9304                 </create>
9305                                 <retrieve permission="ADMIN_ACQ_FUND">
9306                     <context link="fund" field="org"/>
9307                 </retrieve>
9308                                 <update permission="ADMIN_ACQ_FUND">
9309                     <context link="fund" field="org"/>
9310                 </update>
9311                                 <delete permission="ADMIN_ACQ_FUND">
9312                     <context link="fund" field="org"/>
9313                 </delete>
9314                         </actions>
9315                 </permacrud>
9316         </class>
9317
9318     <class id="acqfap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation_percent" oils_persist:tablename="acq.fund_allocation_percent" reporter:label="Fund Allocation Percent">
9319         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9320             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9321             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9322             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9323             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9324             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9325             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9326             <field reporter:label="Note" name="note" reporter:datatype="text" />
9327             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9328         </fields>
9329         <links>
9330             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9331             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9332             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9333         </links>
9334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9335                         <actions>
9336                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9337                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9338                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9339                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9340                         </actions>
9341                 </permacrud>
9342     </class>
9343
9344         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9346                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9347                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9348                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9349                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9350                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9351                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9352                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9353                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9354                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9355                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9356                 </fields>
9357                 <links>
9358                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9359                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9360                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9361                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9362                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9363                 </links>
9364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9365                         <actions>
9366                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9367                         </actions>
9368                 </permacrud>
9369         </class>
9370
9371         <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
9372                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9373                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9374                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9375                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9376                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9377                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9378                 </fields>
9379                 <links>
9380                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9381                 </links>
9382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9383                         <actions>
9384                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9385                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9386                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9387                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9388                         </actions>
9389                 </permacrud>
9390         </class>
9391
9392         <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">
9393                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9394                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9395                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9396                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9397                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9398                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9399                         <field reporter:label="State" name="state" reporter:datatype="text" />
9400                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9401                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9402                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9403                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9404                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9405                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9406                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9407                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9408                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9409                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9410                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9411                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9412                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9413                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9414                 </fields>
9415                 <links>
9416                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9417                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9418                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9419                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9420                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9421                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9422                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9423                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9424                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9425                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9426                 </links>
9427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9428                         <actions>
9429                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9430                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9431                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9432                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9433                         </actions>
9434                 </permacrud>
9435         </class>
9436
9437         <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">
9438                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9439                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9440                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9441                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9442                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9443                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9444                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9445                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9446                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9447                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9448                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9449                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9450                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9451                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9452                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9453                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9454                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9455                 </fields>
9456                 <links>
9457                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9458                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9459                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9460                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9461                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9462                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9463                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9464                 </links>
9465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9466             <actions>
9467                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9468             </actions>
9469                 </permacrud>
9470         </class>
9471
9472         <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
9473                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9474                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9475                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9476                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9477                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9478                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9479                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9480                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9481                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9482                 </fields>
9483                 <links>
9484                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9485                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9486                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9487                 </links>
9488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9489             <actions>
9490                 <create permission="CREATE_PURCHASE_ORDER">
9491                     <context link="purchase_order" field="ordering_agency"/>
9492                 </create>
9493                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9494                     <context link="purchase_order" field="ordering_agency"/>
9495                 </retrieve>
9496                 <update permission="CREATE_PURCHASE_ORDER">
9497                     <context link="purchase_order" field="ordering_agency"/>
9498                 </update>
9499                 <delete permission="CREATE_PURCHASE_ORDER">
9500                     <context link="purchase_order" field="ordering_agency"/>
9501                 </delete>
9502             </actions>
9503                 </permacrud>
9504         </class>
9505
9506         <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
9507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9508                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9509                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9510                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9511                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9512                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9513                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9514                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9515                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9516                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9517                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9518                 </fields>
9519                 <links>
9520                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9521                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9522                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9523                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9524                 </links>
9525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9526             <actions>
9527                 <create permission="CREATE_PURCHASE_ORDER">
9528                     <context link="purchase_order" field="ordering_agency"/>
9529                 </create>
9530                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9531                     <context link="purchase_order" field="ordering_agency"/>
9532                 </retrieve>
9533                 <update permission="CREATE_PURCHASE_ORDER">
9534                     <context link="purchase_order" field="ordering_agency"/>
9535                 </update>
9536                 <delete permission="CREATE_PURCHASE_ORDER">
9537                     <context link="purchase_order" field="ordering_agency"/>
9538                 </delete>
9539             </actions>
9540                 </permacrud>
9541         </class>
9542
9543         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9545                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9546                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9547                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9548                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9549                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9550                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9551                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9552                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9553                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9554                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9555                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9556                         <field reporter:label="State" name="state" reporter:datatype="text" />
9557                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9558                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9559                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9560                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9561                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9562                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9563                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9564                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9565                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9566                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9567                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9568                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9569                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9570                 </fields>
9571                 <links>
9572                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9575                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9576                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9577                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9578                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9579                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9580                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9581                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9582                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9583                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9584                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9585                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9586                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9587                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9588                 </links>
9589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9590                         <actions>
9591                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9592                                         <context link="purchase_order" field="ordering_agency"/>
9593                                         <context link="picklist" field="org_unit"/>
9594                                 </retrieve>
9595                         </actions>
9596                 </permacrud>
9597         </class>
9598
9599         <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">
9600                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9601                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9602                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9603                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9604                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9605                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9606                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9607                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9608                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9609                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9610                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9611                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9612                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9613                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9614                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9615                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9616                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9617                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9618                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9619                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9620                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9621                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9622                 </fields>
9623                 <links>
9624                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9625                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9626                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9627                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9628                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9629                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9630                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9631                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9632                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9633                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9634                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9635                 </links>
9636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9637                         <actions>
9638                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9639                                         <context link="purchase_order" field="ordering_agency"/>
9640                                         <context link="picklist" field="org_unit"/>
9641                                 </retrieve>
9642                         </actions>
9643                 </permacrud>
9644         </class>
9645
9646         <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">
9647                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9648                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9649                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9650                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9651                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9652                 </fields>
9653                 <links>
9654                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9655                 </links>
9656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9657                         <actions>
9658                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9659                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9660                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9661                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9662                         </actions>
9663                 </permacrud>
9664         </class>
9665
9666         <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">
9667                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9668                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9669                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9670                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9671                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9672                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9673                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9674                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9675                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9676                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9677                 </fields>
9678                 <links>
9679                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9680                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9681                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9682                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9683                 </links>
9684         </class>
9685
9686         <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">
9687                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9688                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9689                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9690                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9691                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9692                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9693                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9694                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9695                 </fields>
9696                 <links>
9697                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9698                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9699                 </links>
9700         </class>
9701
9702         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
9703                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9704                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9705                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9706                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9707                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9708                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9709                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9710                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9711                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9712                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9713                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9714                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9715                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9716                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9717                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9718                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9719                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9720                 </fields>
9721                 <links>
9722                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9723                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9724                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9725                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9726                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9727                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9728                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9729                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9730                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9731                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9732                 </links>
9733         </class>
9734
9735         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
9736                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9737                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9738                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9739                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9740                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9741                 </fields>
9742                 <links/>
9743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9744                         <actions>
9745                                 <retrieve />
9746                         </actions>
9747                 </permacrud>
9748         </class>
9749
9750         <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
9751                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9752                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9753                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9754                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9755                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9756                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9757             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9758                 </fields>
9759                 <links/>
9760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9761             <actions>
9762                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9763                 <retrieve />
9764                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9765                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9766             </actions>
9767         </permacrud>
9768         </class>
9769
9770         <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">
9771                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9772                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9773                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9774                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9775                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9776                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9777                 </fields>
9778                 <links/>
9779         </class>
9780         <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">
9781                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9782                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9783                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9784                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9785                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9786                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9787                 </fields>
9788                 <links>
9789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9790                 </links>
9791         </class>
9792
9793         <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">
9794             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9795                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9796                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9797                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9798                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9799                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9800                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9801         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9802
9803             </fields>
9804             <links>
9805                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9806             </links>
9807             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9808                 <actions>
9809                     <create permission="ADMIN_PROVIDER">
9810                         <context link="provider" field="owner"/>
9811                     </create>
9812                     <retrieve permission="ADMIN_PROVIDER">
9813                         <context link="provider" field="owner"/>
9814                     </retrieve>
9815                     <update permission="ADMIN_PROVIDER">
9816                         <context link="provider" field="owner"/>
9817                     </update>
9818                     <delete permission="ADMIN_PROVIDER">
9819                         <context link="provider" field="owner"/>
9820                     </delete>
9821                 </actions>
9822             </permacrud>
9823         </class>
9824         
9825         <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">
9826             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9827                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9828                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9829                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9830                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9831             </fields>
9832             <links>
9833                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9834             </links>
9835             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9836                 <actions>
9837                     <create permission="ADMIN_PROVIDER">
9838                         <context link="provider" field="owner"/>
9839                     </create>
9840                     <retrieve permission="ADMIN_PROVIDER">
9841                         <context link="provider" field="owner"/>
9842                     </retrieve>
9843                     <update permission="ADMIN_PROVIDER">
9844                         <context link="provider" field="owner"/>
9845                     </update>
9846                     <delete permission="ADMIN_PROVIDER">
9847                         <context link="provider" field="owner"/>
9848                     </delete>
9849                 </actions>
9850             </permacrud>
9851         </class>
9852         
9853         <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">
9854             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9855                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9856                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9857                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9858                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9859                 </fields>
9860                 <links/>
9861         </class>
9862
9863         <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
9864                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9865                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9866                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9867                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9868                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9869                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9870                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9871                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9872                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9873                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9874                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9875                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9876                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9877                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9878                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9879                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9880                 </fields>
9881                 <links>
9882                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9883                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9884                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9885                 </links>
9886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9887             <actions>
9888                 <create permission="ADMIN_PROVIDER">
9889                     <context link="provider" field="owner"/>
9890                 </create>
9891                 <retrieve permission="ADMIN_PROVIDER">
9892                     <context link="provider" field="owner"/>
9893                 </retrieve>
9894                 <update permission="ADMIN_PROVIDER">
9895                     <context link="provider" field="owner"/>
9896                 </update>
9897                 <delete permission="ADMIN_PROVIDER">
9898                     <context link="provider" field="owner"/>
9899                 </delete>
9900             </actions>
9901         </permacrud>
9902         </class>
9903
9904         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9905                 oils_obj:fieldmapper="acq::edi_attr" 
9906                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9907                 <fields oils_persist:primary="key">
9908                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9909                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9910                 </fields>
9911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9912             <actions>
9913                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9914                 <retrieve/>
9915                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9916                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9917             </actions>
9918         </permacrud>
9919         </class>
9920         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9921                 oils_obj:fieldmapper="acq::edi_attr_set" 
9922                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9923                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9924                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9925                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9926                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9927                 </fields>
9928                 <links>
9929                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9930                 </links>
9931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9932             <actions>
9933                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9934                 <retrieve/>
9935                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9936                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9937             </actions>
9938         </permacrud>
9939         </class>
9940         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9941                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9942                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9944                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9945                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9946                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9947                 </fields>
9948                 <links>
9949                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9950                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9951                 </links>
9952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9953             <actions>
9954                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9955                 <retrieve/>
9956                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9957                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9958             </actions>
9959         </permacrud>
9960         </class>
9961
9962
9963         <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
9964                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9965                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9966                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9967                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9968                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9969                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9970                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9971                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9972                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9973                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9974                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9975                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9976                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9977                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9978                 </fields>
9979                 <links>
9980                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9981                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9982                 </links>
9983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9984             <actions>
9985                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9986                     <context link="account" jump="provider" field="owner"/>
9987                 </retrieve>
9988                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9989                     <context link="account" jump="provider" field="owner"/>
9990                 </update>
9991                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9992                     <context link="account" jump="provider" field="owner"/>
9993                 </delete>
9994             </actions>
9995         </permacrud>
9996         </class>
9997
9998
9999         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10000                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10001                         <field name="id" reporter:datatype="id" />
10002                         <field name="parent" reporter:datatype="link"/>
10003                         <field name="owner" reporter:datatype="link"/>
10004                         <field name="create_time" reporter:datatype="timestamp"/>
10005                         <field name="name" reporter:datatype="text"/>
10006                         <field name="shared" reporter:datatype="bool"/>
10007                         <field name="share_with" reporter:datatype="link"/>
10008                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10009                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10010                 </fields>
10011                 <links>
10012                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10013                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10014                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10015                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10016                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10017                 </links>
10018         </class>
10019         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10020                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10021                         <field name="id" reporter:datatype="id" />
10022                         <field name="parent" reporter:datatype="link"/>
10023                         <field name="owner" reporter:datatype="link"/>
10024                         <field name="create_time" reporter:datatype="timestamp"/>
10025                         <field name="name" reporter:datatype="text"/>
10026                         <field name="shared" reporter:datatype="bool"/>
10027                         <field name="share_with" reporter:datatype="link"/>
10028                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10029                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10030                 </fields>
10031                 <links>
10032                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10033                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10034                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10035                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10036                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10037                 </links>
10038         </class>
10039         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10040                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10041                         <field name="id" reporter:datatype="id" />
10042                         <field name="parent" reporter:datatype="link"/>
10043                         <field name="owner" reporter:datatype="link"/>
10044                         <field name="create_time" reporter:datatype="timestamp"/>
10045                         <field name="name" reporter:datatype="text"/>
10046                         <field name="shared" reporter:datatype="bool"/>
10047                         <field name="share_with" reporter:datatype="link"/>
10048                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10049                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10050                 </fields>
10051                 <links>
10052                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10053                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10054                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10055                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10056                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10057                 </links>
10058         </class>
10059         <class id="rt" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
10060                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10061                         <field name="id" reporter:datatype="id" />
10062                         <field name="owner" reporter:datatype="link"/>
10063                         <field name="create_time" reporter:datatype="timestamp"/>
10064                         <field name="name" reporter:datatype="text"/>
10065                         <field name="data" reporter:datatype="text"/>
10066                         <field name="folder" reporter:datatype="link"/>
10067                         <field name="description" reporter:datatype="text"/>
10068                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10069                 </fields>
10070                 <links>
10071                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10072                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10073                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10074                 </links>
10075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10076             <actions>
10077                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10078                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10079                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10080                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10081             </actions>
10082         </permacrud>
10083         </class>
10084         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10085                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10086                         <field name="id" reporter:datatype="id" />
10087                         <field name="owner" reporter:datatype="link"/>
10088                         <field name="create_time" reporter:datatype="timestamp"/>
10089                         <field name="template" reporter:datatype="link"/>
10090                         <field name="data" reporter:datatype="text"/>
10091                         <field name="folder" reporter:datatype="link"/>
10092                         <field name="recur" reporter:datatype="bool"/>
10093                         <field name="recurrence" reporter:datatype="interval"/>
10094                         <field name="name" reporter:datatype="text"/>
10095                         <field name="description" reporter:datatype="text"/>
10096                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10097                 </fields>
10098                 <links>
10099                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10100                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10101                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10102                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10103                 </links>
10104         </class>
10105         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10106                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10107                         <field name="id" reporter:datatype="id" />
10108                         <field name="runner" reporter:datatype="link"/>
10109                         <field name="start_time" reporter:datatype="timestamp"/>
10110                         <field name="complete_time" reporter:datatype="timestamp"/>
10111                         <field name="run_time" reporter:datatype="timestamp"/>
10112                         <field name="email" reporter:datatype="text"/>
10113                         <field name="excel_format" reporter:datatype="bool"/>
10114                         <field name="csv_format" reporter:datatype="bool"/>
10115                         <field name="html_format" reporter:datatype="bool"/>
10116                         <field name="error_code" reporter:datatype="int"/>
10117                         <field name="error_text" reporter:datatype="text"/>
10118                         <field name="report" reporter:datatype="link"/>
10119                         <field name="folder" reporter:datatype="link"/>
10120                         <field name="chart_pie" reporter:datatype="bool"/>
10121                         <field name="chart_bar" reporter:datatype="bool"/>
10122                         <field name="chart_line" reporter:datatype="bool"/>
10123                 </fields>
10124                 <links>
10125                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10126                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10127                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10128                 </links>
10129         </class>
10130         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
10131                 <fields oils_persist:primary="id">
10132                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10133                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10134                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10135                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10136                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10137                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10138                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10139                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10140                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10141                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10142                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10143                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10144                 </fields>
10145                 <links>
10146                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10147                 </links>
10148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10149                         <actions>
10150                                 <retrieve />
10151                         </actions>
10152                 </permacrud>
10153         </class>
10154         <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">
10155                 <fields oils_persist:primary="id">
10156                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10157                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10158                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10159                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10160                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10161                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10162                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10163                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10164                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10165                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10166                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10167                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10168                 </fields>
10169                 <links>
10170                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10171                 </links>
10172         </class>
10173         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10174                 <fields oils_persist:primary="id">
10175                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10176                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10177                         <field reporter:label="Fingerprint" name="fingerprint" />
10178                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10179                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10180                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10181                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10182                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10183                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10184                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10185                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10186                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10187                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10188                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10189                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10190                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10191                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10192                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10193                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10194                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10195                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10196                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10197                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10198                 </fields>
10199                 <links>
10200                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10201                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10202                 </links>
10203         </class>
10204         <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">
10205                 <fields oils_persist:primary="id">
10206                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10207                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10208                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10209                 </fields>
10210                 <links>
10211                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10212                 </links>
10213         </class>
10214         <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">
10215                 <fields oils_persist:primary="id">
10216                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10217                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10218                 </fields>
10219                 <links>
10220                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10221                 </links>
10222         </class>
10223         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
10224                 <fields oils_persist:primary="id">
10225                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10226                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10227                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10228                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10229                 </fields>
10230                 <links>
10231                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10232                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10233                 </links>
10234         </class>
10235         <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">
10236                 <fields oils_persist:primary="xact">
10237                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10238                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
10239                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10240                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10241                 </fields>
10242                 <links>
10243                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10244                 </links>
10245         </class>
10246         <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">
10247                 <fields oils_persist:primary="xact">
10248                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10249                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
10250                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10251                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10252                 </fields>
10253                 <links>
10254                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10255                 </links>
10256         </class>
10257         <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">
10258                 <fields oils_persist:primary="id">
10259                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10260                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10261                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10262                 </fields>
10263                 <links>
10264                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10265                 </links>
10266         </class>
10267         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
10268                 <fields oils_persist:primary="id">
10269                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10270                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10271                 </fields>
10272                 <links>
10273                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10274                 </links>
10275         </class>
10276         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
10277                 <fields oils_persist:primary="bibid">
10278                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10279                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10280                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10281                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10282                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10283                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10284                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10285                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10286                 </fields>
10287                 <links>
10288                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10289                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10290                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10291                 </links>
10292         </class>
10293         <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
10294                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10295                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10296                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10297                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10298                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10299                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10300                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10301                 </fields>
10302                 <links>
10303                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10304                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10305                 </links>
10306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10307                         <actions>
10308                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10309                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10310                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10311                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10312                         </actions>
10313                 </permacrud>
10314         </class>
10315         <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">
10316                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10317                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10318                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10319                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10320                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10321                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10322                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10323                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10324                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10325                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10326                 </fields>
10327                 <links>
10328                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10329                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10330                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10331                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10332                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10333                 </links>
10334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10335                         <actions>
10336                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10337                                         <context link="formula" field="owner"/>
10338                                 </create>
10339                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10340                                         <context link="formula" field="owner"/>
10341                                 </retrieve>
10342                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10343                                         <context link="formula" field="owner"/>
10344                                 </update>
10345                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10346                                         <context link="formula" field="owner"/>
10347                                 </delete>
10348                         </actions>
10349                 </permacrud>
10350         </class>
10351
10352         <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">
10353                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10355                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10356                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10357                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10358                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10359                 </fields>
10360                 <links>
10361                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10362                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10363                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10364                 </links>
10365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10366                         <actions>
10367                                 <create permission="CREATE_PURCHASE_ORDER">
10368                                         <context link="formula" field="owner"/>
10369                 </create>
10370                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10371                                         <context link="formula" field="owner"/>
10372                 </retrieve>
10373                                 <update permission="CREATE_PURCHASE_ORDER">
10374                                         <context link="formula" field="owner"/>
10375                 </update>
10376                                 <delete permission="CREATE_PURCHASE_ORDER">
10377                                         <context link="formula" field="owner"/>
10378                 </delete>
10379                         </actions>
10380                 </permacrud>
10381         </class>
10382
10383         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10384                 <fields oils_persist:primary="id">
10385                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10386                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10387                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10388                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10389                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10390                 </fields>
10391                 <links>
10392                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10393                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10394                 </links>
10395         </class>
10396
10397         <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
10398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10399                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10400                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10401                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10402                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10403                 </fields>
10404                 <links>
10405                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10406                 </links>
10407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10408                         <actions>
10409                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10410                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10411                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10412                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10413                         </actions>
10414                 </permacrud>
10415         </class>
10416
10417         <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
10418                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10419                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10420                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10421                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10422                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10423                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10424                 </fields>
10425                 <links>
10426                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10427                 </links>
10428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10429                         <actions>
10430                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10431                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10432                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10433                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10434                         </actions>
10435                 </permacrud>
10436         </class>
10437
10438         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10439                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10440                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10441                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10442                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10443                 </fields>
10444                 <links>
10445                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10446                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10447                 </links>
10448         </class>
10449
10450         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10451                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10452                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10453                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10454                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10455                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10456                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10457                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10458                 </fields>
10459                 <links>
10460                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10461                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10463                 </links>
10464         </class>
10465
10466         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10467                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10468                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10469                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10470                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10471                 </fields>
10472                 <links>
10473                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10474                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10475                 </links>
10476         </class>
10477
10478         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
10479                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10480                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10481                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10482                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10483                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10484                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10485                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10486                 </fields>
10487                 <links>
10488                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10489                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10490                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10491                 </links>
10492         </class>
10493
10494         <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
10495                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10496                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10497                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10498                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10499                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10500                 </fields>
10501                 <links>
10502                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10503                 </links>
10504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10505             <actions>
10506                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10507                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10508                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10509                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10510             </actions>
10511                 </permacrud>
10512         </class>
10513
10514         <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
10515                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10516                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10517                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10518                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10519                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10520                 </fields>
10521                 <links>
10522                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10523                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10524                 </links>
10525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10526                         <actions>
10527                                 <create permission="ADMIN_CLAIM_POLICY">
10528                                         <context link="claim_policy" field="org_unit"/>
10529                 </create>
10530                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10531                                         <context link="claim_policy" field="org_unit"/>
10532                 </retrieve>
10533                                 <update permission="ADMIN_CLAIM_POLICY">
10534                                         <context link="claim_policy" field="org_unit"/>
10535                 </update>
10536                                 <delete permission="ADMIN_CLAIM_POLICY">
10537                                         <context link="claim_policy" field="org_unit"/>
10538                 </delete>
10539                         </actions>
10540                 </permacrud>
10541         </class>
10542
10543     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10544         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10545             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10546             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10547             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10548             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10549             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10550             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10551             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10552             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10553             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10554             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10555             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10556             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10557             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10558             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10559             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10560             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10561                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10562                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10563                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10564         </fields>
10565         <links>
10566             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10567         </links>
10568     </class>
10569
10570     <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">
10571         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10572             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10573             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10574             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10575             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10576             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10577         </fields>
10578     </class>
10579
10580     <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">
10581         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10582             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10583             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10584             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10585             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10586             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10587             <field reporter:label="City" name="city" reporter:datatype="text"/>
10588             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10589             <field reporter:label="State" name="state" reporter:datatype="text"/>
10590             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10591             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10592             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10593         </fields>
10594     </class>
10595
10596     <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">
10597         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10598             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10599             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10600             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10601             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10602             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10603             <field reporter:label="City" name="city" reporter:datatype="text"/>
10604             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10605             <field reporter:label="State" name="state" reporter:datatype="text"/>
10606             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10607             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10608             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10609         </fields>
10610     </class>
10611
10612     <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">
10613         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10614             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10615             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10616             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10617             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10618             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10619             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10620         </fields>
10621     </class>
10622
10623     <class id="stgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::setting_stage" oils_persist:tablename="staging.setting_stage" reporter:label="User Setting Stage">
10624         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10625             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10626             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10627             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10628             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10629             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10630             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10631         </fields>
10632     </class>
10633
10634         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
10635                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10636                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10637                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10638                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10639                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10640                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10641                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10642                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10643                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10644                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10645                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10646                 </fields>
10647                 <links>
10648                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10649                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10650                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10651                 </links>
10652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10653                         <actions>
10654                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10655                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10656                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10657                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10658                         </actions>
10659                 </permacrud>
10660         </class>
10661
10662         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10663                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10664                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10665                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10666                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10667                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10668                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10669                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10670                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10671                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10672                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10673                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10674                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10675                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10676                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10677                 </fields>
10678                 <links>
10679                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10680                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10681                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10682                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10683                 </links>
10684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10685                         <actions>
10686                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10687                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10688                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10689                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10690                         </actions>
10691                 </permacrud>
10692         </class>
10693
10694         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
10695                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10696                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10697                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10698                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10699                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10700                 </fields>
10701                 <links>
10702                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10703                 </links>
10704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10705                         <actions>
10706                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10707                     <context link="fieldset" field="owning_lib"/>
10708                 </create>
10709                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10710                     <context link="fieldset" field="owning_lib"/>
10711                 </retrieve>
10712                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10713                     <context link="fieldset" field="owning_lib"/>
10714                 </update>
10715                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10716                     <context link="fieldset" field="owning_lib"/>
10717                 </delete>
10718                         </actions>
10719                 </permacrud>
10720         </class>
10721
10722     <class id="aufhl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_loops" oils_persist:tablename="action.unfulfilled_hold_loops" oils_persist:readonly="true">
10723         <fields>
10724             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10725             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10726             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10727         </fields>
10728                 <links>
10729                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10730                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10731                 </links>
10732     </class>
10733
10734     <class id="aufhml" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_min_loop" oils_persist:tablename="action.unfulfilled_hold_min_loop" oils_persist:readonly="true">
10735         <fields>
10736             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10737             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10738         </fields>
10739                 <links>
10740                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10741                 </links>
10742     </class>
10743
10744     <class id="aufhil" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_innermost_loop" oils_persist:tablename="action.unfulfilled_hold_innermost_loop" oils_persist:readonly="true">
10745         <fields>
10746             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10747             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10748             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10749         </fields>
10750                 <links>
10751                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10752                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10753                 </links>
10754     </class>
10755
10756     <class id="aufhmxl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_max_loop" oils_persist:tablename="action.unfulfilled_hold_max_loop" oils_persist:readonly="true">
10757         <fields>
10758             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10759             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10760         </fields>
10761                 <links>
10762                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10763                 </links>
10764     </class>
10765
10766     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10767                 <oils_persist:source_definition><![CDATA[
10768
10769             SELECT  DISTINCT l.*
10770               FROM  action.unfulfilled_hold_loops l
10771                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10772               WHERE l.count = m.max
10773
10774                 ]]></oils_persist:source_definition>
10775         <fields>
10776             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10777             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10778             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10779         </fields>
10780                 <links>
10781                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10782                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10783                 </links>
10784     </class>
10785
10786         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10787                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10788                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10789                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10790                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10791                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10792                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10793                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10794                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10795                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10796                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10797                 </fields>
10798                 <links>
10799                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10800                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10801                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10802                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10803                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10804                 </links>
10805         </class>
10806
10807         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10808                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10809                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10810                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10811                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10812                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10813                 </fields>
10814                 <links>
10815                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10816                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10817                 </links>
10818         </class>
10819
10820         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10821                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10822                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10823                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10824                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10825                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10826                 </fields>
10827                 <links>
10828                 </links>
10829         </class>
10830
10831         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10832                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10833                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10834                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10835                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10836                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10837                 </fields>
10838                 <links>
10839                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10840                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10841                 </links>
10842         </class>
10843         
10844         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10845                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10846                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10847                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10848                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10849                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10850                 </fields>
10851                 <links>
10852                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10853                 </links>
10854         </class>
10855         
10856         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
10857                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10858                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10859                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10860                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10861                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10862                 </fields>
10863                 <links>
10864                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10865                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10866                 </links>
10867         </class>
10868
10869         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10870                 <fields oils_persist:primary="name">
10871                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10872                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10873                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10874                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10875                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10876                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10877                 </fields>
10878                 <links>
10879                 </links>
10880         </class>
10881
10882         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10883                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10884                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10885                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10886                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10887                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10888                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10889                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10890                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10891                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10892                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10893                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10894                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10895                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10896                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10897                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10898                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10899                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10900                 </fields>
10901                 <links>
10902                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10903                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10904                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10905                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10906                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10907                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10908                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10909                 </links>
10910         </class>
10911
10912         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10913                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10914                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10915                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10916                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10917                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10918                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10919                 </fields>
10920                 <links>
10921                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10922                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10923                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10924                 </links>
10925         </class>
10926
10927         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10928                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10929                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10930                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10931                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10932                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10933                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10934                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10935                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10936                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10937                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10938                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10939                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10940                 </fields>
10941                 <links>
10942                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10943                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10944                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10945                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10946                 </links>
10947         </class>
10948
10949         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10950                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10951                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10952                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10953                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10954                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10955                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10956                 </fields>
10957                 <links>
10958                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10959                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10960                 </links>
10961         </class>
10962
10963         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10964                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10965                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10966                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10967                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10968                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10969                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10970                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10971                 </fields>
10972                 <links>
10973                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10974                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10975                 </links>
10976         </class>
10977
10978         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
10979                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10980                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10981                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10982                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10983                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10984                 </fields>
10985                 <links>
10986                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10987                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10988                 </links>
10989         </class>
10990
10991         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10992                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10993                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10994                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10995                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10996                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10997                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10998                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10999                 </fields>
11000                 <links>
11001                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11002                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11003                 </links>
11004         </class>
11005
11006         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11007                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11008                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11009                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11010                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11011                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11012                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11013                 </fields>
11014                 <links>
11015                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11016                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11017                 </links>
11018         </class>
11019
11020         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11021                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11022                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11023                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11024                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11025                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11026                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11027                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11028                 </fields>
11029                 <links>
11030                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11031                 </links>
11032         </class>
11033
11034         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11035                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11036                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11037                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11038                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11039                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11040                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11041                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11042                 </fields>
11043                 <links>
11044                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11045                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11046                 </links>
11047         </class>
11048
11049         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11050                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11051                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11052                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11053                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11054                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11055                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11056                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11057                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11058                 </fields>
11059                 <links>
11060                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11061                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11062                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11063                 </links>
11064         </class>
11065
11066         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11067                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11068                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11069                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11070                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11071                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11072                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11073                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11074                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11075                 </fields>
11076                 <links>
11077                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11078                 </links>
11079         </class>
11080
11081         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11082                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11083                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11084                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11085                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11086                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11087                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11088                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11089                 </fields>
11090                 <links>
11091                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11092                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11093                 </links>
11094         </class>
11095
11096         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11097                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11098                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11099                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11100                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11101                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11102                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11103                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11104                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11105                 </fields>
11106                 <links>
11107                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11108                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11109                 </links>
11110         </class>
11111
11112         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11113                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11114                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11115                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11116                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11117                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11118                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11119                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11120                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11121                 </fields>
11122                 <links>
11123                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11124                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11125                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11126                 </links>
11127         </class>
11128
11129         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11130                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11131                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11132                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11133                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11134                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11135                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11136                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11137                 </fields>
11138                 <links>
11139                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11140                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11141                 </links>
11142         </class>
11143
11144         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11145                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11146                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11147                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11148                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11149                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11150                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11151                 </fields>
11152                 <links>
11153                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11154                 </links>
11155         </class>
11156
11157         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11158                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11159                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11160                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11161                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11162                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11163                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11164                 </fields>
11165                 <links>
11166                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11167                 </links>
11168         </class>
11169
11170         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11171                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11172                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11173                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11174                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11175                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11176                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11177                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11178                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11179                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11180                 </fields>
11181                 <links>
11182                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11183                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11184                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11185                 </links>
11186         </class>
11187
11188         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11189                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11190                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11191                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11192                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11193                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11194                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11195                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11196                 </fields>
11197                 <links>
11198                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11199                 </links>
11200         </class>
11201
11202         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11203                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11204                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11205                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11206                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11207                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11208                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11209                 </fields>
11210                 <links>
11211                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11212                 </links>
11213         </class>
11214
11215         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11216                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11217                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11218                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11219                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11220                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11221                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11222                 </fields>
11223                 <links>
11224                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11225                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11226                 </links>
11227         </class>
11228
11229         <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">
11230                 <fields oils_persist:primary="id">
11231                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11232                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11233                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11234                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11235                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11236                 </fields>
11237                 <links>
11238                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11239                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11240                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11241                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11242                 </links>
11243         </class>
11244
11245         <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">
11246                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11247                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11248                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11249                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11250                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11251                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11252                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11253                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11254                 </fields>
11255                 <links/>
11256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11257                         <actions>
11258                                 <retrieve/>
11259                         </actions>
11260                 </permacrud>
11261         </class>
11262
11263         <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">
11264                 <fields oils_persist:primary="ptype_key">
11265                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11266                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11267                 </fields>
11268                 <links/>
11269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11270                         <actions>
11271                                 <retrieve/>
11272                         </actions>
11273                 </permacrud>
11274         </class>
11275
11276         <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">
11277                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11278                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11279                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11280                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11281                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11282                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11283                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11284                 </fields>
11285                 <links>
11286                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11287                 </links>
11288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11289                         <actions>
11290                                 <retrieve/>
11291                         </actions>
11292                 </permacrud>
11293         </class>
11294
11295         <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
11296                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11297                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11298                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11299                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11300                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11301                 </fields>
11302                 <links>
11303                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11304                 </links>
11305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11306                         <actions>
11307                                 <retrieve/>
11308                         </actions>
11309                 </permacrud>
11310         </class>
11311
11312     <class
11313         id="uvs"
11314         controller="open-ils.cstore open-ils.pcrud"
11315         oils_obj:fieldmapper="url_verify::session"
11316         oils_persist:tablename="url_verify.session"
11317         reporter:label="URL Verification Session"
11318     >
11319         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11320             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11321             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11322                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11323             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11324             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11325             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11326             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11327             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11328             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11329         </fields>
11330
11331         <links>
11332             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11333             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11334             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11335             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11336             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11337         </links>
11338
11339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11340             <actions>
11341                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11342             </actions>
11343         </permacrud>
11344
11345     </class>
11346
11347     <class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">
11348         <oils_persist:source_definition><![CDATA[
11349             SELECT
11350                 cbrebi.id AS id,  -- so we can have a pkey in our view
11351                 uvs.id AS session,
11352                 uvs.owning_lib,
11353                 cbrebi.target_biblio_record_entry
11354             FROM url_verify.session uvs
11355             JOIN container.biblio_record_entry_bucket cbreb
11356                 ON (uvs.container = cbreb.id)
11357             JOIN container.biblio_record_entry_bucket_item cbrebi
11358                 ON (cbrebi.bucket = cbreb.id)
11359         ]]></oils_persist:source_definition>
11360         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11361             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11362             <field reporter:label="Session" name="session" reporter:datatype="link" />
11363             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11364             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11365         </fields>
11366         <links>
11367             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11368             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11369             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11370         </links>
11371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11372             <actions>
11373                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11374             </actions>
11375         </permacrud>
11376     </class>
11377
11378     <class
11379         id="uvus"
11380         controller="open-ils.cstore open-ils.pcrud"
11381         oils_obj:fieldmapper="url_verify::url_selector"
11382         oils_persist:tablename="url_verify.url_selector"
11383         reporter:label="URL Verification URL Selector"
11384     >
11385         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11386             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11387             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11388                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11389             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11390         </fields>
11391
11392         <links>
11393             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11394             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11395         </links>
11396
11397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11398             <actions>
11399                 <create permission="URL_VERIFY">
11400                     <context link="session" field="owning_lib"/>
11401                 </create>
11402                 <retrieve permission="URL_VERIFY">
11403                     <context link="session" field="owning_lib"/>
11404                 </retrieve>
11405                 <update permission="URL_VERIFY">
11406                     <context link="session" field="owning_lib"/>
11407                 </update>
11408                 <delete permission="URL_VERIFY">
11409                     <context link="session" field="owning_lib"/>
11410                 </delete>
11411             </actions>
11412         </permacrud>
11413
11414     </class>
11415
11416     <class
11417         id="uvu"
11418         controller="open-ils.cstore open-ils.pcrud"
11419         oils_obj:fieldmapper="url_verify::url"
11420         oils_persist:tablename="url_verify.url"
11421         reporter:label="URL Verification URL"
11422     >
11423         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11424             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11425                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11426                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11427                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11428                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11429             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11430             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11431             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11432             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11433             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11434             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11435             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11436             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11437             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11438             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11439             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11440             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11441             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11442         </fields>
11443
11444         <links>
11445             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11446             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11447             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11448             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11449             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11450         </links>
11451
11452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11453             <actions>
11454                 <create permission="URL_VERIFY">
11455                     <context link="session" field="owning_lib"/>
11456                 </create>
11457                 <retrieve permission="URL_VERIFY">
11458                     <context link="session" field="owning_lib"/>
11459                 </retrieve>
11460                 <update permission="URL_VERIFY">
11461                     <context link="session" field="owning_lib"/>
11462                 </update>
11463                 <delete permission="URL_VERIFY">
11464                     <context link="session" field="owning_lib"/>
11465                 </delete>
11466             </actions>
11467         </permacrud>
11468
11469     </class>
11470
11471     <class
11472         id="uvva"
11473         controller="open-ils.cstore open-ils.pcrud"
11474         oils_obj:fieldmapper="url_verify::verification_attempt"
11475         oils_persist:tablename="url_verify.verification_attempt"
11476         reporter:label="URL Verification Attempt"
11477     >
11478         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11479             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11480                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11481                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11482             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11483             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11484         </fields>
11485
11486         <links>
11487             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11488             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11489         </links>
11490
11491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11492             <actions>
11493                 <create permission="URL_VERIFY">
11494                     <context link="session" field="owning_lib"/>
11495                 </create>
11496                 <retrieve permission="URL_VERIFY">
11497                     <context link="session" field="owning_lib"/>
11498                 </retrieve>
11499                 <update permission="URL_VERIFY">
11500                     <context link="session" field="owning_lib"/>
11501                 </update>
11502                 <delete permission="URL_VERIFY">
11503                     <context link="session" field="owning_lib"/>
11504                 </delete>
11505             </actions>
11506         </permacrud>
11507
11508     </class>
11509
11510     <class
11511         id="uvuv"
11512         controller="open-ils.cstore open-ils.pcrud"
11513         oils_obj:fieldmapper="url_verify::url_verification"
11514         oils_persist:tablename="url_verify.url_verification"
11515         reporter:label="URL Verification"
11516     >
11517         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11518             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11519                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11520                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11521             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11522             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11523             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11524             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11525                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11526         </fields>
11527
11528         <links>
11529             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11530             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11531             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11532         </links>
11533
11534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11535             <actions>
11536                 <create permission="URL_VERIFY">
11537                     <context link="attempt" jump="session" field="owning_lib"/>
11538                 </create>
11539                 <retrieve permission="URL_VERIFY">
11540                     <context link="attempt" jump="session" field="owning_lib"/>
11541                 </retrieve>
11542                 <update permission="URL_VERIFY">
11543                     <context link="attempt" jump="session" field="owning_lib"/>
11544                 </update>
11545                 <delete permission="URL_VERIFY">
11546                     <context link="attempt" jump="session" field="owning_lib"/>
11547                 </delete>
11548             </actions>
11549         </permacrud>
11550
11551     </class>
11552
11553         <class
11554                 id="cfdi"
11555                 controller="open-ils.cstore open-ils.pcrud"
11556                 oils_obj:fieldmapper="config::filter_dialog_interface"
11557                 oils_persist:tablename="config.filter_dialog_interface"
11558                 reporter:label="FilterDialog Interface">
11559                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11560                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11561                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11562                 </fields>
11563                 <links>
11564                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11565                 </links>
11566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11567                         <actions>
11568                                 <retrieve />
11569                         </actions>
11570                 </permacrud>
11571         </class>
11572
11573         <class
11574                 id="cfdfs"
11575                 controller="open-ils.cstore open-ils.pcrud"
11576                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11577                 oils_persist:tablename="config.filter_dialog_filter_set"
11578                 reporter:label="FilterDialog Filter Set">
11579                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11580                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11581                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11582                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11583                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11584                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11585                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11586                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11587                 </fields>
11588                 <links>
11589                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11590                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11591                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11592                 </links>
11593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11594                         <actions>
11595                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11596                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11597                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11598                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11599                         </actions>
11600                 </permacrud>
11601
11602         </class>
11603
11604         <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">
11605                 <fields oils_persist:primary="code">
11606                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11607                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11608                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11609                 </fields>
11610                 <links/>
11611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11612                         <actions>
11613                                 <retrieve/>
11614                         </actions>
11615                 </permacrud>
11616         </class>
11617
11618         <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
11619                 <oils_persist:source_definition><![CDATA[
11620
11621             SELECT  b.id,
11622                     MAX(dcp.edit_date) AS last_delete_date
11623              FROM   biblio.record_entry b
11624                     JOIN asset.call_number cn ON (cn.record = b.id)
11625                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11626              WHERE  NOT b.deleted
11627              GROUP BY b.id
11628              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11629
11630                 ]]></oils_persist:source_definition>
11631                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11632                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11633                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11634                 </fields>
11635                 <links>
11636                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11637                 </links>
11638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11639                         <actions>
11640                                 <retrieve/>
11641                         </actions>
11642                 </permacrud>
11643         </class>
11644
11645         <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
11646                 <oils_persist:source_definition><![CDATA[
11647
11648             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
11649             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
11650             -- -- may not.
11651             -- SELECT
11652             --     bre.id AS bib_id,
11653             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11654             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11655             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11656             -- FROM (
11657                 SELECT
11658                     y.bre AS id,
11659                     COALESCE( x.copy_count, 0 ) AS copy_count,
11660                     y.hold_count AS hold_count,
11661                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS hold_copy_ratio
11662                 FROM (
11663                         SELECT
11664                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11665                             COUNT(*) AS hold_count
11666                         FROM action.hold_request h
11667                         WHERE
11668                             cancel_time IS NULL
11669                             AND fulfillment_time IS NULL
11670                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11671                         GROUP BY 1
11672                     )y LEFT JOIN (
11673                         SELECT 
11674                             (SELECT id
11675                                 FROM biblio.record_entry 
11676                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11677                             ) AS bre, 
11678                             COUNT(*) AS copy_count
11679                         FROM asset.copy
11680                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11681                         WHERE copy.holdable 
11682                             AND NOT copy.deleted 
11683                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11684                         GROUP BY 1
11685                     )x ON x.bre = y.bre
11686                 -- )z RIGHT JOIN (
11687                 --     SELECT id
11688                 --     FROM biblio.record_entry
11689                 --     WHERE NOT deleted
11690                 -- )bre ON (z.bib_id = bre.id)
11691                 
11692
11693                 ]]></oils_persist:source_definition>
11694                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11695                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11696                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11697                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11698                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11699                 </fields>
11700                 <links>
11701                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11702                 </links>
11703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11704                         <actions>
11705                                 <retrieve/>
11706                         </actions>
11707                 </permacrud>
11708         </class>
11709
11710         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
11711                 <oils_persist:source_definition><![CDATA[
11712             SELECT *,
11713                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
11714                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11715             FROM
11716                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
11717                     FROM
11718                         action.hold_request ahr
11719                         JOIN reporter.hold_request_record rhrr USING (id)
11720                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11721                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11722                     WHERE
11723                         ahr.cancel_time IS NULL
11724                         AND ahr.fulfillment_time IS NULL
11725                     GROUP BY bib_record, pickup_lib
11726                 )x
11727                 JOIN
11728                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11729                     FROM
11730                         action.hold_request ahr
11731                         JOIN reporter.hold_request_record rhrr USING (id)
11732                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11733                     WHERE
11734                         ahr.cancel_time IS NULL
11735                         AND ahr.fulfillment_time IS NULL
11736                     GROUP BY bib_record
11737                 )y
11738                 USING (id)
11739                 ]]></oils_persist:source_definition>
11740                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11741                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11742                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11743                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11744                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11745                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11746                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11747                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11748                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11749                 </fields>
11750                 <links>
11751                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11752                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11753                 </links>
11754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11755                         <actions>
11756                                 <retrieve/>
11757                         </actions>
11758                 </permacrud>
11759         </class>
11760
11761         <class id="rhcrpbapd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup_desc" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library (and Descendants) ">
11762                 <oils_persist:source_definition><![CDATA[
11763             WITH counts_at_ou AS (
11764                 SELECT  rhrr.bib_record AS id,
11765                         aou.id AS pickup_lib_or_desc,
11766                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11767                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11768                   FROM  actor.org_unit aou
11769                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11770                         action.hold_request ahr
11771                         JOIN reporter.hold_request_record rhrr USING (id)
11772                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11773                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11774                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11775                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11776                         AND (actor.org_unit_ancestor_at_depth(ahr.pickup_lib,aout.depth)).id = (actor.org_unit_ancestor_at_depth(ac.circ_lib,aout.depth)).id
11777                   GROUP BY 1, 2
11778             )
11779             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11780                    y.holds_everywhere, y.copy_count_everywhere,
11781                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE x.holds_at_or_below::FLOAT/x.copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
11782                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11783             FROM counts_at_ou x
11784                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11785                     FROM
11786                         action.hold_request ahr
11787                         JOIN reporter.hold_request_record rhrr USING (id)
11788                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11789                     WHERE
11790                         ahr.cancel_time IS NULL
11791                         AND ahr.fulfillment_time IS NULL
11792                     GROUP BY bib_record
11793                 )y
11794                 USING (id)
11795                 ]]></oils_persist:source_definition>
11796                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11797                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11798                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11799                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11800                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11801                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11802                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11803                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11804                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11805                 </fields>
11806                 <links>
11807                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11808                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11809                 </links>
11810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11811                         <actions>
11812                                 <retrieve/>
11813                         </actions>
11814                 </permacrud>
11815         </class>
11816
11817         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
11818                 <oils_persist:source_definition><![CDATA[
11819             SELECT
11820                 ac.id,
11821                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11822                 MAX(actac.xact_start) AS last_circ
11823             FROM asset.copy ac
11824                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11825             GROUP BY ac.id
11826
11827             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11828             --SELECT
11829             --    ac.id,
11830             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11831             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11832             --FROM asset.copy ac
11833             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11834             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11835             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11836                 ]]></oils_persist:source_definition>
11837                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11838                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11839                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11840                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11841                 </fields>
11842                 <links>
11843                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11844                 </links>
11845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11846                         <actions>
11847                                 <retrieve/>
11848                         </actions>
11849                 </permacrud>
11850         </class>
11851
11852         <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">
11853                 <fields oils_persist:primary="id">
11854                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11855                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11856                 </fields>
11857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11858                         <actions>
11859                                 <retrieve/>
11860                         </actions>
11861                 </permacrud>
11862         </class>
11863
11864         <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">
11865                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11866                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11867                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11868                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11869                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11870                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11871                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11872                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11873                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11874                 </fields>
11875                 <links>
11876                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11877                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11878                 </links>
11879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11880                         <actions>
11881                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11882                                 <retrieve/>
11883                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11884                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11885                         </actions>
11886                 </permacrud>
11887         </class>
11888
11889         <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">
11890                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11891                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11892                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11893                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11894                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11895                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11896                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11897                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11898                 </fields>
11899                 <links>
11900                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11901                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11902                 </links>
11903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11904                         <actions>
11905                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11906                                 <retrieve/>
11907                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11908                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11909                         </actions>
11910                 </permacrud>
11911         </class>
11912
11913
11914         <!-- ********************************************************************************************************************* -->
11915         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11916         <!-- ********************************************************************************************************************* -->
11917         <class id="rccc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_circ" oils_persist:tablename="reporter.classic_current_circ" reporter:core="true" reporter:label="Classic Circulation View">
11918                 <fields oils_persist:primary="id">
11919                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11920                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11921                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11922                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11923                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11924                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11925                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11926                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11927                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11928                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11929                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11930                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11931                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11932                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11933                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11934                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11935                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11936                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11937                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11938                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11939                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11940                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11941                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11942                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11943                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11944                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11945                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11946                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11947                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11948                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11949                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11950                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11951                 </fields>
11952                 <links>
11953                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11954                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11955                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11956                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11957                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11958                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11959                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11960                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11961                 </links>
11962         </class>
11963
11964         <class id="rsce1" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat1" oils_persist:tablename="reporter.legacy_cat1" reporter:label="CAT1 Entry">
11965                 <fields oils_persist:primary="id">
11966                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11967                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11968                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11969                 </fields>
11970                 <links>
11971                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11972                 </links>
11973         </class>
11974
11975         <class id="rsce2" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat2" oils_persist:tablename="reporter.legacy_cat2" reporter:label="CAT2 Entry">
11976                 <fields oils_persist:primary="id">
11977                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11978                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11979                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11980                 </fields>
11981                 <links>
11982                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11983                 </links>
11984         </class>
11985
11986         <class id="rccbs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_billing_summary" oils_persist:tablename="reporter.classic_current_billing_summary" reporter:core="true" reporter:label="Classic Open Transaction Summary">
11987                 <fields oils_persist:primary="id">
11988                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11989
11990                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11991                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11992                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11993
11994                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11995                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11996                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11997
11998                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11999                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12000
12001                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12002                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12003                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12004
12005                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12006                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12007
12008                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12009                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12010                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12011
12012                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12013                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12014                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12015
12016                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12017                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12018                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12019                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12020
12021                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12022                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12023
12024                 </fields>
12025                 <links>
12026                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12028                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12029                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12030                 </links>
12031         </class>
12032
12033         <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
12034                 <oils_persist:source_definition><![CDATA[
12035
12036             SELECT
12037                 po.ordering_agency AS ordering_agency,
12038                 po.id AS purchase_order,
12039                 li.id AS lineitem,
12040                 lid.id AS lineitem_detail,
12041                 cpa.id AS claim_policy_action
12042             FROM
12043                 acq.lineitem_detail lid
12044                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12045                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12046                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12047                 JOIN acq.claim_policy_action cpa ON (
12048                     cpa.claim_policy = cp.id
12049
12050                     -- we only care about claim policy actions whose claim
12051                     -- interval we'd reached or exceeded
12052                     AND (NOW() - cpa.action_interval) > po.order_date
12053
12054                     -- filter out all claim policy actions where claim events
12055                     -- have occurred on or after the action's action_interval
12056                     AND NOT EXISTS (
12057                         SELECT 1
12058                         FROM
12059                             acq.claim_event evt
12060                             JOIN acq.claim claim ON (
12061                                 claim.id = evt.claim
12062                                 AND claim.lineitem_detail = lid.id
12063                             )
12064                         WHERE
12065                             evt.event_date >= (po.order_date + cpa.action_interval)
12066                     )
12067                 )
12068             WHERE
12069                 lid.cancel_reason IS NULL
12070                 AND li.cancel_reason IS NULL -- belt/suspenders
12071                 AND po.cancel_reason IS NULL -- belt/suspenders
12072                 AND lid.recv_time IS NULL
12073                 AND po.state = 'on-order'
12074             ORDER BY 1, 2, 3, 4, 5
12075
12076                 ]]></oils_persist:source_definition>
12077                 <fields>
12078                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12079                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12080                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12081                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12082                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12083                 </fields>
12084                 <links>
12085                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12086                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12087                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12088                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12089                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12090                 </links>
12091         </class>
12092         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary" oils_persist:tablename="acq.lineitem_summary">
12093                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12094                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12095                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12096                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12097                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12098                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12099                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12100                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12101                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12102                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12103                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12104                 </fields>
12105                 <links>
12106                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12107                 </links>
12108     </class>
12109         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12110                 <oils_persist:source_definition><![CDATA[
12111             SELECT * FROM acq.lineitem_summary 
12112                                 WHERE item_count > (invoice_count + cancel_count)
12113         ]]></oils_persist:source_definition>
12114                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12115                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12116                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12117                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12118                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12119                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12120                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12121                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12122                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12123                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12124                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12125                 </fields>
12126                 <links>
12127                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12128                 </links>
12129     </class>
12130         <class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">
12131                 <oils_persist:source_definition><![CDATA[
12132
12133                         SELECT  t.*
12134                           FROM  action.transit_copy t
12135                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12136                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12137                           WHERE s.parent_ou <> d.parent_ou
12138
12139                 ]]></oils_persist:source_definition>
12140                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12141                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12142                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12143                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12144                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12145                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12146                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12147                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12148                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12149                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12150                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12151                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12152                 </fields>
12153                 <links>
12154                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12155                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12156                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12157                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12158                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12159                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12160                 </links>
12161         </class>
12162
12163     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12164                 <oils_persist:source_definition><![CDATA[
12165
12166         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12167                 SELECT
12168                         cp.id as copy,
12169                         COUNT(circ.id),
12170                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12171                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12172                 FROM
12173                         asset.copy cp
12174                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12175                 GROUP BY 1, 3, 4
12176                 UNION ALL
12177                 SELECT
12178                         cp.id as copy,
12179                         COUNT(circ.id),
12180                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12181                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12182                 FROM
12183                         asset.copy cp
12184                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12185                 GROUP BY 1, 3, 4
12186                 UNION ALL
12187                 SELECT
12188                         id as copy,
12189                         circ_count,
12190                         -1 AS year,
12191                         false as is_renewal
12192                 FROM
12193                         extend_reporter.legacy_circ_count
12194         )x GROUP BY 1, 3, 4
12195
12196                 ]]></oils_persist:source_definition>
12197         <fields>
12198             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12199             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12200             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12201             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12202         </fields>
12203                 <links>
12204                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12205                 </links>
12206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12207                         <actions>
12208                                 <retrieve/>
12209                         </actions>
12210                 </permacrud>
12211     </class>
12212
12213         <class id="rodcirc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::overdue_circs" oils_persist:tablename="reporter.overdue_circs" reporter:core="true" reporter:label="Overdue Circulation">
12214                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12215                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12216                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12217                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12218                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12219                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12220                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12221                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12222                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12223                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12224                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12225                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12226                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12227                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12228                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12229                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12230                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12231                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12232                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12233                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12234                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12235                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12236                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12237                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12238                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12239                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12240                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12241                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12242                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12243                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12244                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12245                 </fields>
12246                 <links>
12247                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12248                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12249                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12250                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12251                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12252                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12253                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12254                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12255                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12256                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12257                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12258                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12259                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12260                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12261                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12262                 </links>
12263         </class>
12264
12265     <class id="rocit" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_item_list" oils_persist:tablename="reporter.classic_item_list" reporter:core="true" reporter:label="Classic Item List">
12266         <fields oils_persist:primary="id">
12267             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12268             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12269             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12270             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12271             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12272             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12273             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12274             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12275             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12276             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12277             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12278             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12279             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12280             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12281             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12282             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12283             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12284             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12285             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12286             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12287             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12288             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12289             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12290             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12291             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12292             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12293             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12294             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12295             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12296             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12297             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12298             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12299             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12300             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12301         </fields>
12302         <links>
12303             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12304             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12305             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12306             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12307             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12308             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12309             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12310             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12311         </links>
12312     </class>
12313
12314     <class id="rmocbbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_owning_lib" oils_persist:tablename="money.open_circ_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Owning Library">
12315         <fields oils_persist:primary="id">
12316             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12317             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12318             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12319             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12320         </fields>
12321         <links>
12322             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12323             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12324         </links>
12325     </class>
12326
12327     <class id="rmobbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_owning_lib" oils_persist:tablename="money.open_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Owning Library">
12328         <fields oils_persist:primary="owning_lib">
12329             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12330             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12331             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12332         </fields>
12333         <links>
12334             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12335         </links>
12336     </class>
12337
12338     <class id="rmocbbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Circulating Library and Owning Library">
12339         <fields oils_persist:primary="id">
12340             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12341             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12342             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12343             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12344             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12345         </fields>
12346         <links>
12347             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12348             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12349             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12350         </links>
12351     </class>
12352
12353     <class id="rmobbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Circulating Library and Owning Library">
12354         <fields oils_persist:primary="circ_lib">
12355             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12356             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12357             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12358             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12359         </fields>
12360         <links>
12361             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12362             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12363         </links>
12364     </class>
12365
12366     <class id="rmocbbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by User Home Library and Owning Library">
12367         <fields oils_persist:primary="id">
12368             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12369             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12370             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12371             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12372             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12373         </fields>
12374         <links>
12375             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12376             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12377             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12378         </links>
12379     </class>
12380
12381     <class id="rmobbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by User Home Library and Owning Library">
12382         <fields oils_persist:primary="home_ou">
12383             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12384             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12385             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12386             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12387         </fields>
12388         <links>
12389             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12390             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12391         </links>
12392     </class>
12393         <class id="acqft" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag" oils_persist:tablename="acq.fund_tag" reporter:label="Fund Tag">
12394                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12395                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12396                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12397                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12398                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12399                 </fields>
12400                 <links>
12401                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12402                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12403                 </links>
12404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12405                         <actions>
12406                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12407                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12408                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12409                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12410                         </actions>
12411                 </permacrud>
12412         </class>
12413         <class id="acqftm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag_map" oils_persist:tablename="acq.fund_tag_map" reporter:label="Fund Tag Map">
12414                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12415                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12416                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12417                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12418                 </fields>
12419                 <links>
12420                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12421                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12422                         </links>
12423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12424                 <actions>
12425                                 <create permission="ADMIN_ACQ_FUND_TAG">
12426                                         <context link="tag" field="owner"/>
12427                                 </create>
12428                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12429                                         <context link="tag" field="owner"/>
12430                                 </retrieve>
12431                                 <update permission="ADMIN_ACQ_FUND_TAG">
12432                                         <context link="tag" field="owner"/>
12433                                 </update>
12434                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12435                                         <context link="tag" field="owner"/>
12436                                 </delete>
12437                         </actions>
12438                 </permacrud>
12439         </class>
12440         <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
12441                 <oils_persist:source_definition><![CDATA[
12442                 SELECT
12443                         poi.purchase_order AS purchase_order,
12444                         ii.invoice AS invoice,
12445                         NULL AS lineitem,
12446                         poi.id AS po_item,
12447                         NULL AS picklist
12448                 FROM
12449                         acq.po_item poi
12450                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12451                 UNION SELECT
12452                         jub.purchase_order AS purchase_order,
12453                         ie.invoice AS invoice,
12454                         jub.id AS lineitem,
12455                         NULL AS po_item,
12456                         jub.picklist AS picklist
12457                 FROM
12458                         acq.lineitem jub
12459                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12460                 UNION SELECT
12461                         ii.purchase_order AS purchase_order,
12462                         ii.invoice AS invoice,
12463                         NULL AS lineitem,
12464                         NULL AS po_item,
12465                         NULL AS picklist
12466                 FROM
12467                         acq.invoice_item ii
12468                 WHERE ii.po_item IS NULL
12469                 UNION SELECT
12470                         ie.purchase_order AS purchase_order,
12471                         ie.invoice AS invoice,
12472                         NULL AS lineitem,
12473                         NULL AS po_item,
12474                         NULL AS picklist
12475                 FROM
12476                         acq.invoice_entry ie
12477                 WHERE ie.lineitem IS NULL
12478                 UNION SELECT
12479                         NULL AS purchase_order,
12480                         NULL AS invoice,
12481                         jub.id AS lineitem,
12482                         NULL AS po_item,
12483                         jub.picklist AS picklist
12484                 FROM
12485                         acq.lineitem jub
12486                 WHERE jub.purchase_order IS NULL
12487                 ]]></oils_persist:source_definition>
12488                 <fields>
12489                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12490                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12491                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12492                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12493                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12494                 </fields>
12495                 <links>
12496                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12497                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12498                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12499                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12500                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12501                 </links>
12502         </class>
12503         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
12504                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12506                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12507                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12508                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12509                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12510                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12511                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12512                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12513                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12514                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12515                 </fields>
12516                 <links>
12517                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12518                 </links>
12519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12520                         <actions>
12521                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12522                                 <retrieve/>
12523                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12524                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12525                         </actions>
12526                 </permacrud>
12527         </class>
12528
12529         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
12530                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12531                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12532                         <field name="date_applied" reporter:datatype="timestamp"/>
12533                         <field name="org" reporter:datatype="org_unit"/>
12534                         <field name="original_value" reporter:datatype="text"/>
12535                         <field name="new_value" reporter:datatype="text"/>
12536                         <field name="field_name" reporter:datatype="link"/>
12537                 </fields>
12538                 <links>
12539                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12540                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12541                 </links>
12542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12543                         <actions>
12544                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12545                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12546                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12547                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12548                         </actions>
12549                 </permacrud>
12550         </class>
12551         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
12552                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12553                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12554                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12555                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12556                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12557                 </fields>
12558                 <links>
12559                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12560                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12561                 </links>
12562         </class>
12563         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
12564                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12565                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12566                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12567                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12568                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12569                 </fields>
12570                 <links>
12571                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12572                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12573                 </links>
12574         </class>
12575         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
12576                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12577                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12578                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12579                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12580                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12581                 </fields>
12582                 <links>
12583                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12584                 </links>
12585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12586                         <actions>
12587                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12588                                 <retrieve/>
12589                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12590                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12591                         </actions>
12592                 </permacrud>
12593         </class>
12594         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
12595                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12596                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12597                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12598                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12599                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12600                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12601                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12602                 </fields>
12603                 <links>
12604                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12605                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12606                 </links>
12607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12608                         <actions>
12609                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12610                                 <retrieve/>
12611                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12612                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12613                         </actions>
12614                 </permacrud>
12615         </class>
12616         <class id="cctt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_tag_type" oils_persist:tablename="config.copy_tag_type" reporter:label="Copy Tag Types" oils_persist:field_safe="true">
12617                 <fields oils_persist:primary="code">
12618                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12619                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12620                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12621                 </fields>
12622                 <links>
12623                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12624                 </links>
12625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12626                         <actions>
12627                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12628                                 <retrieve/>
12629                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12630                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12631                         </actions>
12632                 </permacrud>
12633         </class>
12634         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
12635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12636                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12637                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12638                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12639                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12640                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12641                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12642                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12643                 </fields>
12644                 <links>
12645                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12646                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12647                 </links>
12648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12649                         <actions>
12650                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12651                                 <retrieve/>
12652                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12653                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12654                         </actions>
12655                 </permacrud>
12656         </class>
12657         <class id="acptcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag_copy_map" oils_persist:tablename="asset.copy_tag_copy_map" reporter:label="Copy Tag Copy Map" oils_persist:field_safe="true">
12658                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12660                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12661                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12662                 </fields>
12663                 <links>
12664                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12665                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12666                 </links>
12667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12668                         <actions>
12669                                 <create permission="UPDATE_COPY">
12670                     <context link="copy" field="circ_lib"/>
12671                 </create>
12672                                 <retrieve/>
12673                                 <update permission="UPDATE_COPY">
12674                     <context link="copy" field="circ_lib"/>
12675                 </update>
12676                                 <delete permission="UPDATE_COPY">
12677                     <context link="copy" field="circ_lib"/>
12678                 </delete>
12679                         </actions>
12680                 </permacrud>
12681         </class>
12682         <class id="hasholdscount" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::has_holds_count" reporter:label="Copy Has Holds Count" oils_persist:readonly="true">
12683         <oils_persist:source_definition><![CDATA[
12684         SELECT ahcm.target_copy AS id,count(*) AS count
12685          FROM
12686          action.hold_request ahr,
12687          action.hold_copy_map ahcm
12688          WHERE
12689          ahr.cancel_time IS NULL AND
12690          ahr.fulfillment_time IS NULL AND
12691          ahr.capture_time IS NULL AND
12692          ahr.id = ahcm.hold
12693          GROUP BY ahcm.target_copy
12694         ]]></oils_persist:source_definition>
12695         <fields oils_persist:primary="id">
12696             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12697             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12698         </fields>
12699         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12700             <actions>
12701                <retrieve/>
12702             </actions>
12703         </permacrud>
12704         </class>
12705
12706         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12707                 oils_obj:fieldmapper="config::workstation_setting_type" 
12708                 oils_persist:tablename="config.workstation_setting_type" 
12709                 reporter:label="Workstation Setting Type">
12710                 <fields oils_persist:primary="name">
12711                         <field name="name" reporter:datatype="text"/>
12712                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12713                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12714                         <field name="datatype" reporter:datatype="text"/>
12715                         <field name="fm_class" reporter:datatype="text"/>
12716                         <field name="grp" reporter:datatype="link"/>
12717                 </fields>
12718                 <links>
12719                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12720                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12721                 </links>
12722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12723                         <actions>
12724                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12725                                 <retrieve/>
12726                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12727                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12728                         </actions>
12729                 </permacrud>
12730         </class>
12731
12732         <!-- no pcrud access is granted for now, because it's assumed these
12733                          setting values will be applied and retrived via the API. -->
12734         <class id="awss" 
12735                 controller="open-ils.cstore"
12736                 oils_obj:fieldmapper="actor::workstation_setting" 
12737                 oils_persist:tablename="actor.workstation_setting" 
12738                 reporter:label="Workstation Setting">
12739                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12740                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12741                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12742                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12743                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12744                 </fields>
12745                 <links>
12746                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12747                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12748                 </links>
12749         </class>
12750
12751         <!-- ********************************************************************************************************************* -->
12752 </IDL>
12753
12754 <!--
12755     vim:noet:ts=4:sw=4:
12756 -->