]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1419813 Fix default joins for config.rule_age_hold_protection.
[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                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <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">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <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">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve/>
231                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </update>
234                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </delete>
237                         </actions>
238                 </permacrud>
239         </class>
240
241         <class  id="vibtg" 
242             controller="open-ils.cstore open-ils.pcrud" 
243             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
244             oils_persist:tablename="vandelay.import_bib_trash_group" 
245             reporter:label="Import/Overlay Field Groups for Removal">
246                 <fields oils_persist:primary="id" 
247                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
249                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
251                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
252                 </fields>
253                 <links>
254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
255                 </links>
256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
257                         <actions>
258                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
259                                 <retrieve/>
260                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266
267         <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">
268                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
269                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
270                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
271                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
272                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
273                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
274                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
275                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
276                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
277                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
278                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
279                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
280                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
281                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
282                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
283                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
285                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
286                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
287                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
289                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
290                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
291                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
292                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
293                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
294                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
295                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
296                 </fields>
297                 <links>
298                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
299                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
300                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
302                 </links>
303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
304                         <actions>
305                                 <create permission="CREATE_IMPORT_ITEM">
306                     <context link="definition" field="owner"/>
307                                 </create>
308                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
309                     <context link="definition" field="owner"/>
310                                 </retrieve>
311                                 <update permission="UPDATE_IMPORT_ITEM">
312                     <context link="definition" field="owner"/>
313                                 </update>
314                                 <delete permission="DELETE_IMPORT_ITEM">
315                     <context link="definition" field="owner"/>
316                                 </delete>
317                         </actions>
318                 </permacrud>
319         </class>
320
321         <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">
322                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
323                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
324                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
325                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
326                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
327                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
328                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
329                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
330                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
331                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
332                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
333                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
334                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
336                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
337                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
338                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
340                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
341                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
343                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
344                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
346                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
347                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
355                                 <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"/>
356                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
364                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
365                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
367                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
368                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
369                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
370                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
371                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
372                 </fields>
373                 <links>
374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
375                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
376                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
377                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <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">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <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">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <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">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <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">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <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">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <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">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <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">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <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">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
606                 </fields>
607                 <links>
608                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
609                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
610                 </links>
611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
612                         <actions>
613                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                         </actions>
618                 </permacrud>
619         </class>
620
621         <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">
622                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
623                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
624                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
625                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
626                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
627                 </fields>
628                 <links>
629                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
630                 </links>
631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
632                         <actions>
633                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                         </actions>
638                 </permacrud>
639         </class>
640
641         <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">
642                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
643                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
644                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
645                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
646                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
647                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
648                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
649                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
650             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
651                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
652                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
653                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
654                 </fields>
655                 <links>
656                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
657                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
658                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
659                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
660                 </links>
661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
662                         <actions>
663                                 <create permission="ADMIN_IMPORT_MATCH_SET">
664                     <context link="match_set" field="owner"/>
665                                 </create>
666                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </retrieve>
669                                 <update permission="ADMIN_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </update>
672                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </delete>
675                         </actions>
676                 </permacrud>
677         </class>
678
679         <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">
680                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
681                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
682                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
683                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
684                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
685                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
686                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
687                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
688                 </fields>
689                 <links>
690                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
691                 </links>
692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
693                         <actions>
694                                 <create permission="ADMIN_IMPORT_MATCH_SET">
695                     <context link="match_set" field="owner"/>
696                                 </create>
697                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </retrieve>
700                                 <update permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </update>
703                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </delete>
706                         </actions>
707                 </permacrud>
708         </class>
709
710         <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">
711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
712                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
713                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
714                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
715                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
716                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
717                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
718                 </fields>
719                 <links>
720                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
721                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
722                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
723                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
724                 </links>
725         </class>
726
727     <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">
728         <fields oils_persist:primary="name">
729             <field reporter:label="Name" name="name" reporter:datatype="text"/>
730             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
731             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
732             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
733         </fields>
734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
735             <actions>
736                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
739                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740             </actions>
741         </permacrud>
742     </class>
743
744     <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">
745         <fields oils_persist:primary="id">
746             <field reporter:label="ID" name="id" reporter:datatype="id"/>
747             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
748             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
749             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
750             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
751         </fields>
752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
753             <actions>
754                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <retrieve/>
756                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
757                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758             </actions>
759         </permacrud>
760     </class>
761
762         <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">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <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">
785                 <fields oils_persist:primary="name">
786                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
787                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
788                         <field reporter:label="Description" name="description" reporter:datatype="text" />
789                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
790                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
791                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
792                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
793                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
794                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
795                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
796                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
797                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
798                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
799                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
800                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
801                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
802                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
803                 </fields>
804                 <links>
805                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
806                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
807                 </links>
808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
809             <actions>
810                 <create permission="ADMIN_SVF" global_required="true"/>
811                 <retrieve/>
812                 <update permission="ADMIN_SVF" global_required="true"/>
813                 <delete permission="ADMIN_SVF" global_required="true"/>
814             </actions>
815         </permacrud>
816         </class>
817
818         <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">
819                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
820                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
821                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
822                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
823             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
824                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
825                 </fields>
826                 <links/>
827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
828             <actions>
829                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
830                 <retrieve/>
831                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
832                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
833             </actions>
834         </permacrud>
835         </class>
836
837         <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">
838                 <fields oils_persist:primary="coded_value">
839                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
840                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
841                 </fields>
842                 <links>
843                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
844                 </links>
845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
846             <actions>
847                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
848                 <retrieve/>
849                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
850                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
851             </actions>
852         </permacrud>
853         </class>
854
855         <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">
856                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
857                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
858                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
859                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
860                 </fields>
861                 <links>
862                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
863                 </links>
864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
865             <actions>
866                 <retrieve/>
867             </actions>
868         </permacrud>
869         </class>
870
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
874                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
875                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
876                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
877                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
878                 </fields>
879                 <links>
880                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
881                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
882                 </links>
883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
884             <actions>
885                 <retrieve/>
886             </actions>
887         </permacrud>
888         </class>
889
890
891         <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">
892                 <fields oils_persist:primary="source">
893                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
894                         <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 -->
895                 </fields>
896                 <links>
897                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
898                 </links>
899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
900             <actions>
901                 <retrieve/>
902             </actions>
903         </permacrud>
904         </class>
905
906         <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">
907                 <fields>
908                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
909                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
910                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
911                 </fields>
912                 <links>
913                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <retrieve/>
918             </actions>
919         </permacrud>
920         </class>
921
922         <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">
923                 <fields oils_persist:primary="id">
924                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
925                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
926                 </fields>
927                 <links>
928                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
929                 </links>
930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
931             <actions>
932                 <retrieve/>
933             </actions>
934         </permacrud>
935         </class>
936
937         <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">
938                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
940                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
941                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
942                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
943                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
944                 </fields>
945                 <links>
946                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
947                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
948                 </links>
949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
950             <actions>
951                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
952                 <retrieve/>
953                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
954                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
955             </actions>
956         </permacrud>
957         </class>
958
959         <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">
960                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
961                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
962                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
963                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
964                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
965                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
966                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
967                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
968             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
969             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
970                 </fields>
971                 <links>
972                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
973                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
974                 </links>
975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
976             <actions>
977                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
978                 <retrieve/>
979                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
980                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
981             </actions>
982         </permacrud>
983         </class>
984
985         <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">
986                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
987                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
988                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
989                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
990                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
991                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
992                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
993                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
994                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
995                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
996                 </fields>
997                 <links>
998                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
999                 </links>
1000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1001             <actions>
1002                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1003                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1004                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1005                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1006             </actions>
1007         </permacrud>
1008         </class>
1009
1010     <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">
1011         <fields oils_persist:primary="name">
1012             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1013             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1014             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1015             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1016             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1017             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1018             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1019             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1020             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1021             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1022         </fields>
1023         <links>
1024             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1025             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1026         </links>
1027         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1028             <actions>
1029                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1030                 <retrieve/>
1031                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1032                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1033             </actions>
1034         </permacrud>
1035     </class>
1036
1037     <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">
1038         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1039             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1040             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1041             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1042             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1043             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1044             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1045             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1046         </fields>
1047         <links>
1048             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1049         </links>
1050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1051             <actions>
1052                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1053                 <retrieve/>
1054                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1055                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1056             </actions>
1057         </permacrud>
1058     </class>
1059
1060     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1061                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1062                         oils_persist:tablename="config.z3950_index_field_map" 
1063                         reporter:label="Z39.50 Index Field Map">
1064         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1065             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1066             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1067             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1068             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1069             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1070             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1071         </fields>
1072         <links>
1073             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1074             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1075             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1076         </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1080                 <retrieve/>
1081                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1082                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1083             </actions>
1084         </permacrud>
1085     </class>
1086
1087
1088         <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">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1090                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1091                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1092                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1093                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1094                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1095                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1096                 </fields>
1097                 <links>
1098             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1099             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1100                 </links>
1101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1102                         <actions>
1103                                 <retrieve/>
1104                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1105                         </actions>
1106                 </permacrud>
1107         </class>
1108
1109         <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">
1110                 <fields oils_persist:primary="key">
1111                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1112                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1113                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1114                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1115                 </fields>
1116                 <links/>
1117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1118                         <actions>
1119                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1120                                 <retrieve/>
1121                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1122                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1123                         </actions>
1124                 </permacrud>
1125         </class>
1126
1127         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1128                 <fields oils_persist:primary="module">
1129                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1130                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1131                 </fields>
1132                 <links/>
1133         </class>
1134
1135         <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">
1136                 <fields oils_persist:primary="module">
1137                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1138                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1139                 </fields>
1140                 <links/>
1141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1142                         <actions>
1143                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1144                                 <retrieve/>
1145                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1146                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1147                         </actions>
1148                 </permacrud>
1149         </class>
1150
1151         <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">
1152                 <fields oils_persist:primary="module">
1153                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1154                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1155                 </fields>
1156                 <links/>
1157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1158                         <actions>
1159                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1160                                 <retrieve/>
1161                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1162                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1163                         </actions>
1164                 </permacrud>
1165         </class>
1166
1167         <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">
1168                 <fields oils_persist:primary="module">
1169                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1170                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1171                 </fields>
1172                 <links/>
1173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1174                         <actions>
1175                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1176                                 <retrieve/>
1177                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1178                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1179                         </actions>
1180                 </permacrud>
1181         </class>
1182
1183         <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">
1184                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1185                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1186                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1187                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1188                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1189                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1190                 </fields>
1191                 <links>
1192                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1193                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1194                 </links>
1195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1196                         <actions>
1197                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1198                     <context link="event_def" field="owner"/>
1199                 </create>
1200                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1201                     <context link="event_def" field="owner"/>
1202                 </retrieve>
1203                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1204                     <context link="event_def" field="owner"/>
1205                 </update>
1206                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1207                     <context link="event_def" field="owner"/>
1208                 </delete>
1209                         </actions>
1210                 </permacrud>
1211         </class>
1212
1213         <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">
1214                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1215                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1216                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1217                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1218                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1219                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1220                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1221                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1222                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1223                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1224                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1225                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1226                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1227                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1228                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1229                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1230                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1231                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1232                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1233                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1234                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1235                 </fields>
1236                 <links>
1237                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1238                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1239                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1240                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1241                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1242                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1243                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1244                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1245                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1246                 </links>
1247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248                         <actions>
1249                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1250                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1251                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1252                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1253                         </actions>
1254                 </permacrud>
1255         </class>
1256
1257         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1258                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1259                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1260                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1261                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1262                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1263                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1264                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1265                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1266                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1267                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1268                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1269                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1270                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1271                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1272                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1273                 </fields>
1274                 <links>
1275                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1276                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1277                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1278                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1279                 </links>
1280         </class>
1281
1282         <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">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1284                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1285                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1286                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1287                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1288                 </fields>
1289                 <links>
1290                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1291                 </links>
1292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1293                         <actions>
1294                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1295                     <context link="event_def" field="owner"/>
1296                 </create>
1297                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1298                     <context link="event_def" field="owner"/>
1299                 </retrieve>
1300                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1301                     <context link="event_def" field="owner"/>
1302                 </update>
1303                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1304                     <context link="event_def" field="owner"/>
1305                 </delete>
1306                         </actions>
1307                 </permacrud>
1308         </class>
1309
1310         <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">
1311                 <oils_persist:source_definition><![CDATA[
1312                 SELECT  atevdef.hook,
1313                         atevdef.name,
1314                         atevdef.reactor,
1315                         atev.id,
1316                         atev.event_def,
1317                         atev.add_time,
1318                         atev.run_time,
1319                         atev.start_time,
1320                         atev.update_time,
1321                         atev.complete_time,
1322                         atev.update_process,
1323                         atev.state,
1324                         atev.user_data,
1325                         atev.template_output,
1326                         atev.error_output,
1327                         atev.async_output,
1328                         targ_circ.id AS target_circ,
1329                         targ_ahr.id AS target_hold,
1330                         COALESCE(
1331                                 targ_circ.circ_lib,
1332                                 targ_ahr.pickup_lib
1333                         ) AS perm_lib
1334                 FROM action_trigger.event atev
1335                 JOIN action_trigger.event_definition atevdef ON
1336                         (atevdef.id = atev.event_def)
1337                 JOIN action_trigger.hook ath ON
1338                         (ath.key = atevdef.hook)
1339                 LEFT JOIN action.circulation targ_circ ON
1340                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1341                 LEFT JOIN action.hold_request targ_ahr ON
1342                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1343                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1344                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1345                                 'circ.staff.max_visible_event_age',
1346                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1347                         ) UNION
1348                         SELECT '1000 YEARS'::INTERVAL AS value
1349                 ) ous)
1350                 ]]></oils_persist:source_definition>
1351                 <fields oils_persist:primary="id">
1352                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1353                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1354                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1355                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1356                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1357                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1358                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1359                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1360                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1361                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1362                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1363                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1364                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1365                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1366                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1367                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1368                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1369                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1370                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1371                 </fields>
1372                 <links>
1373                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1374                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1375                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1376                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1377                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1378                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1379                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1380                 </links>
1381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1382                         <actions>
1383                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1384                         </actions>
1385                 </permacrud>
1386         </class>
1387
1388         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1389                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1390                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1391                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1392                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1393                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1394                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1395                 </fields>
1396                 <links>
1397                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1398                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1399                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1400                 </links>
1401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1402                         <actions>
1403                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1404                         </actions>
1405                 </permacrud>
1406         </class>
1407
1408         <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">
1409                 <fields oils_persist:primary="code">
1410                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1411                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1413                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1414                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1415                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1416                 </fields>
1417                 <links/>
1418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1419             <actions>
1420                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1421                 <retrieve/>
1422                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1423                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1424             </actions>
1425         </permacrud>
1426         </class>
1427
1428         <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">
1429                 <fields oils_persist:primary="code">
1430                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1431                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1432                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1433                 </fields>
1434                 <links/>
1435         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1436             <actions>
1437                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1438                 <retrieve/>
1439                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1440                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1441             </actions>
1442         </permacrud>
1443         </class>
1444
1445         <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">
1446                 <fields oils_persist:primary="code">
1447                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1448                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1449                 </fields>
1450                 <links/>
1451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1452             <actions>
1453                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1454                 <retrieve/>
1455                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1456                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1457             </actions>
1458         </permacrud>
1459         </class>
1460
1461         <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">
1462                 <fields oils_persist:primary="code">
1463                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1464                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1465                 </fields>
1466                 <links/>
1467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468             <actions>
1469                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1470                 <retrieve/>
1471                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1472                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1473             </actions>
1474         </permacrud>
1475         </class>
1476
1477         <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">
1478                 <fields oils_persist:primary="code">
1479                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1480                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1481                 </fields>
1482                 <links/>
1483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1484             <actions>
1485                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1486                 <retrieve/>
1487                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1488                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1489             </actions>
1490         </permacrud>
1491         </class>
1492
1493         <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">
1494                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1495                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1496                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1497                 </fields>
1498                 <links/>
1499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1500             <actions>
1501                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1502                 <retrieve/>
1503                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1504                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1505             </actions>
1506         </permacrud>
1507         </class>
1508
1509         <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">
1510                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1511                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1512                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1513                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1514                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1515                 </fields>
1516         <links>
1517             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1518             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1519             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1520         </links>
1521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1522             <actions>
1523                 <create permission="UPDATE_COPY">
1524                     <context link="target_copy" field="circ_lib"/>
1525                 </create>
1526                 <retrieve/>
1527                 <update permission="UPDATE_COPY">
1528                     <context link="target_copy" field="circ_lib"/>
1529                 </update>
1530                 <delete permission="UPDATE_COPY">
1531                     <context link="target_copy" field="circ_lib"/>
1532                 </delete>
1533             </actions>
1534         </permacrud>
1535         </class>
1536
1537         <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">
1538                 <fields oils_persist:primary="code">
1539                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1540                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1541                 </fields>
1542                 <links/>
1543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1544             <actions>
1545                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1546                 <retrieve/>
1547                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1548                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1549             </actions>
1550         </permacrud>
1551         </class>
1552
1553         <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">
1554                 <fields oils_persist:primary="code">
1555                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1556                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1557                 </fields>
1558                 <links/>
1559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1560             <actions>
1561                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1562                 <retrieve/>
1563                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1564                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1565             </actions>
1566         </permacrud>
1567         </class>
1568
1569         <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">
1570                 <fields oils_persist:primary="code">
1571                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1572                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1573                 </fields>
1574                 <links/>
1575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1576             <actions>
1577                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1578                 <retrieve/>
1579                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1580                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1581             </actions>
1582         </permacrud>
1583         </class>
1584
1585     <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">
1586         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1587             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1588             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1589             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1590             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1591             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1592             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1593             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1594             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1595             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1596             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1597             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1598             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1599             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1600             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1601             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1602             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1603             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1604         </fields>
1605         <links/>
1606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1607             <actions>
1608                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1609                 <retrieve/>
1610                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1611                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1612             </actions>
1613         </permacrud>
1614     </class>
1615
1616     <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">
1617         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1618             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1619             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1620             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1621             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1622             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1623             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1624             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1625             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1626             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1627             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1628             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1629             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1630             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1631             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1632             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1633             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1634             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1635             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1636             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1637         </fields>
1638         <links/>
1639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1640             <actions>
1641                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1642                 <retrieve/>
1643                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1644                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1645             </actions>
1646         </permacrud>
1647     </class>
1648
1649     <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">
1650         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1651             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1652             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1653             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1654             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1655             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1656         </fields>
1657         <links>
1658             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1659             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1660             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1661         </links>
1662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1663             <actions>
1664                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1665                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1666                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1667                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1668             </actions>
1669         </permacrud>
1670     </class>
1671
1672         <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">
1673                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1674                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1675                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1676                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1677                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1678                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1679                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1680                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1681                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1682                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1683                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1684                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1685                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1686                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1687                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1688                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1689                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1690             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1691                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1692                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1693                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1694                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1695                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1696                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1697                 </fields>
1698                 <links>
1699                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1700                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1701                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1702                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1703                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1704                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1705                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1706                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1707                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1708                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1709                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1710                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1711                         <link field="age_hold_protect_rule" reltype="might_have" key="id" map="" class="crahp"/>
1712             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1713                 </links>
1714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1715             <actions>
1716                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1717                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1718                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1719                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1720             </actions>
1721         </permacrud>
1722         </class>
1723
1724         <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">
1725                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1726                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1727                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1728                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1729                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1730                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1731                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1732                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1733                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1734                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1735                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1736                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1737                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1738                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1739                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1740                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1741             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1742                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1743                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1744             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1745                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1746                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1747                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1748                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1749             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1750             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1751             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1752                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1753                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1754                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1755                 </fields>
1756                 <links>
1757                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1758                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1759                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1760                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1761                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1762                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1763                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1764                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1765                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1766                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1767                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1768                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1769                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1770                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1771             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1772                 </links>
1773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1774             <actions>
1775                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1776                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1777                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1778                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1779             </actions>
1780         </permacrud>
1781         </class>
1782
1783     <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">
1784         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1785             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1786             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1787             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1788         </fields>
1789         <links/>
1790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1791             <actions>
1792                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1793                 <retrieve/>
1794                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1795                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1796             </actions>
1797         </permacrud>
1798     </class>
1799
1800     <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">
1801         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1802             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1803             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1804             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1805             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1806             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1807             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1808             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1809         </fields>
1810         <links>
1811             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1812         </links>
1813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1814             <actions>
1815                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1816                 <retrieve/>
1817                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1818                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1819             </actions>
1820         </permacrud>
1821     </class>
1822
1823     <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">
1824         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1825             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1826             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1827             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1828             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1829             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1830         </fields>
1831         <links>
1832             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1833             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1834         </links>
1835         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1836             <actions>
1837                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1838                     <context link="matchpoint" field="org_unit"/>
1839                 </create>
1840                 <retrieve/>
1841                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1842                     <context link="matchpoint" field="org_unit"/>
1843                 </update>
1844                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1845                     <context link="matchpoint" field="org_unit"/>
1846                 </delete>
1847             </actions>
1848         </permacrud>
1849     </class>
1850
1851     <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">
1852         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1853             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1854             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1855             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1856         </fields>
1857         <links>
1858             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1859             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1860         </links>
1861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1862             <actions>
1863                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1864                     <context link="limit_set" field="owning_lib"/>
1865                 </create>
1866                 <retrieve/>
1867                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1868                     <context link="limit_set" field="owning_lib"/>
1869                 </update>
1870                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1871                     <context link="limit_set" field="owning_lib"/>
1872                 </delete>
1873             </actions>
1874         </permacrud>
1875     </class>
1876     <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">
1877         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1878             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1879             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1880             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1881         </fields>
1882         <links>
1883             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1884             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1885         </links>
1886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1887             <actions>
1888                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1889                     <context link="limit_set" field="owning_lib"/>
1890                 </create>
1891                 <retrieve/>
1892                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1893                     <context link="limit_set" field="owning_lib"/>
1894                 </update>
1895                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1896                     <context link="limit_set" field="owning_lib"/>
1897                 </delete>
1898             </actions>
1899         </permacrud>
1900     </class>
1901
1902     <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">
1903         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1904             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1905             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1906             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1907             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1908         </fields>
1909         <links>
1910             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1911             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1912         </links>
1913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1914             <actions>
1915                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1916                     <context link="limit_set" field="owning_lib"/>
1917                 </create>
1918                 <retrieve/>
1919                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1920                     <context link="limit_set" field="owning_lib"/>
1921                 </update>
1922                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1923                     <context link="limit_set" field="owning_lib"/>
1924                 </delete>
1925             </actions>
1926         </permacrud>
1927     </class>
1928
1929         <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">
1930                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1931                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1932                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1933                 </fields>
1934                 <links/>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1938                 <retrieve/>
1939                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1940                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1941             </actions>
1942         </permacrud>
1943         </class>
1944
1945         <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">
1946                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1947                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1948                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1949                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1950                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1951                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1952                 </fields>
1953                 <links>
1954                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1955                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1956                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1957                 </links>
1958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1959             <actions>
1960                 <create permission="ADMIN_SURVEY">
1961                     <context link="survey" field="owner"/>
1962                 </create>
1963                 <retrieve/>
1964                 <update permission="ADMIN_SURVEY">
1965                     <context link="survey" field="owner"/>
1966                 </update>
1967                 <delete permission="ADMIN_SURVEY">
1968                     <context link="survey" field="owner"/>
1969                 </delete>
1970             </actions>
1971         </permacrud>
1972         </class>
1973         <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">
1974                 <fields oils_persist:primary="id" oils_persist:sequence="">
1975                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1976                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1977                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1978                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1979                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1980                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1981                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1982                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1983                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1984                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1985                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1986                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1987                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1988                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1989                 </fields>
1990                 <links>
1991                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1992                 </links>
1993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1994                         <actions>
1995                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
1996                                         <context link="usr" field="home_ou" />
1997                                 </retrieve>
1998                         </actions>
1999                 </permacrud>
2000         </class>
2001         <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">
2002                 <fields oils_persist:primary="id" oils_persist:sequence="">
2003                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2004                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2005                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2006                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2007                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2008                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2009                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2010                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2011                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2012                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2013                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2014                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2015                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2016                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2017                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2018                 </fields>
2019                 <links>
2020                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2021                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2022                 </links>
2023         </class>
2024         <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">
2025                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2026                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2027                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2028                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2029                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2030                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2031                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2032                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2033                 </fields>
2034                 <links>
2035                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2036                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2037                 </links>
2038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2039             <actions>
2040                 <create permission="UPDATE_USER" context_field="owner">
2041                     <context link="usr" field="home_ou"/>
2042                 </create>
2043                                 <!-- note: public notes are still accessible via API -->
2044                 <retrieve permission="UPDATE_USER">
2045                     <context link="usr" field="home_ou"/>
2046                                 </retrieve>
2047                 <update permission="UPDATE_USER">
2048                     <context link="usr" field="home_ou"/>
2049                                 </update>
2050                 <delete permission="UPDATE_USER">
2051                     <context link="usr" field="home_ou"/>
2052                                 </delete>
2053             </actions>
2054         </permacrud>
2055         </class>
2056         <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">
2057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2058                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2059                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2060                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2061                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2062                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2063                 </fields>
2064                 <links>
2065                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2066                 </links>
2067         </class>
2068         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2069                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2070                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2071                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2072                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2073                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2074                 </fields>
2075                 <links>
2076                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2077                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2078                 </links>
2079         </class>
2080         <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">
2081                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2082                         <field name="field" reporter:datatype="link"/>
2083                         <field name="id" reporter:datatype="id" />
2084                         <field name="source" reporter:datatype="link"/>
2085                         <field name="value" reporter:datatype="text"/>
2086                 </fields>
2087                 <links>
2088                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2089                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2090                 </links>
2091         </class>
2092         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2093                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2094                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2095                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2096                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2097                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2098                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2099                 </fields>
2100                 <links>
2101                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2102                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2104                 </links>
2105         </class>
2106         <class id="ancihu" controller="open-ils.cstore" 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">
2107                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2108                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2109                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2110                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2111                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2112                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2113                 </fields>
2114                 <links>
2115                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2116                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2117                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2118                 </links>
2119         </class>
2120         <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">
2121                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2122                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2123                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2124                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2125                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2126                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2127                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2128                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2129                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2130                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2131                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2132                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2133                 </fields>
2134                 <links>
2135                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2136                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2137                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2138                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2139                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2140                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2141                 </links>
2142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2143             <actions>
2144                 <create permission="TRANSIT_COPY" context_field="owner">
2145                     <context link="target_copy" field="circ_lib"/>
2146                 </create>
2147                 <retrieve/>
2148                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2149                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2150             </actions>
2151         </permacrud>
2152         </class>
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2155                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2156                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2158                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2159                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2160                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2161                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2162                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2163                 </fields>
2164                 <links>
2165                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2166                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2167                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2169                 </links>
2170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2171             <actions>
2172                 <create permission="ADMIN_SURVEY">
2173                     <context link="survey" field="owner"/>
2174                 </create>
2175                 <retrieve/>
2176                 <update permission="ADMIN_SURVEY">
2177                     <context link="survey" field="owner"/>
2178                 </update>
2179                 <delete permission="ADMIN_SURVEY">
2180                     <context link="survey" field="owner"/>
2181                 </delete>
2182             </actions>
2183         </permacrud>
2184         </class>
2185         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2186                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2187                         <field name="bucket" />
2188                         <field name="id" reporter:datatype="id" />
2189                         <field name="target_copy" reporter:datatype="link"/>
2190                         <field name="create_time" reporter:datatype="timestamp" />
2191                         <field name="pos" reporter:datatype="int" />
2192                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2193                 </fields>
2194                 <links>
2195                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2196                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2197             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2198                 </links>
2199         </class>
2200         <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">
2201                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2202                         <field name="id" reporter:datatype="id" />
2203                         <field name="item" reporter:datatype="link"/>
2204                         <field name="note" reporter:datatype="text" />
2205                 </fields>
2206                 <links>
2207                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2208                 </links>
2209         </class>
2210
2211         <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">
2212                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2213                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2214                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2215                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2216                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2217                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2218                 </fields>
2219                 <links>
2220                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2221                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2222                 </links>
2223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2224                         <actions>
2225                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226                                 <retrieve/>
2227                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2228                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2229                         </actions>
2230                 </permacrud>
2231         </class>
2232
2233         <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">
2234                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2235                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2236                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2237                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2238                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2239                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2240                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2241                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2243                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2244                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2245                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2246                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2247                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2248                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2249                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2250                 </fields>
2251                 <links>
2252                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2253                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2254                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2255                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2256                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2257                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2258                 </links>
2259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2260                         <actions>
2261                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2262                                 <retrieve/>
2263                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2264                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2265                         </actions>
2266                 </permacrud>
2267         </class>
2268
2269         <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">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2271                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2272                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2273                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2274                 </fields>
2275                 <links>
2276                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2277                 </links>
2278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2279                         <actions>
2280                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2281                                 <retrieve/>
2282                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2283                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2284                         </actions>
2285                 </permacrud>
2286         </class>
2287
2288         <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">
2289                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2290                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2291                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2292                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2293                 </fields>
2294                 <links>
2295                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2296                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2297                 </links>
2298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2299                         <actions>
2300                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2301                                 <retrieve/>
2302                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2303                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2304                         </actions>
2305                 </permacrud>
2306         </class>
2307
2308         <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">
2309                 <fields oils_persist:primary="code">
2310                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2311                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2312                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2313                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2314                 </fields>
2315                 <links>
2316                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2317                 </links>
2318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2319                         <actions>
2320                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2321                                 <retrieve/>
2322                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2323                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2324                         </actions>
2325                 </permacrud>
2326         </class>
2327
2328         <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">
2329                 <fields oils_persist:primary="code">
2330                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2331                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2332                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2333                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2334                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2335                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2336                 </fields>
2337                 <links>
2338                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2339                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2340                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2341                 </links>
2342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2343                         <actions>
2344                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2345                                 <retrieve/>
2346                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2347                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2348                         </actions>
2349                 </permacrud>
2350         </class>
2351
2352     <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">
2353         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2354             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2355             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2356             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2357         </fields>
2358         <links>
2359             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2360             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2361         </links>
2362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2363             <actions>
2364                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2365                 <retrieve/>
2366                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2367                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2368             </actions>
2369         </permacrud>
2370     </class>
2371
2372         <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">
2373                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2374                         <field name="active" reporter:datatype="bool"/>
2375                         <field name="create_date" reporter:datatype="timestamp"/>
2376                         <field name="creator" />
2377                         <field name="deleted" reporter:datatype="bool"/>
2378                         <field name="edit_date" reporter:datatype="timestamp"/>
2379                         <field name="editor" />
2380                         <field name="id" reporter:datatype="id" />
2381                         <field name="last_xact_id" />
2382                         <field name="marc" />
2383                         <field name="source" />
2384                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2385                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2386                         <field name="heading" />
2387                         <field name="simple_heading" />
2388                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2389                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2390                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2391                 </fields>
2392                 <links>
2393                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2394                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2395                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2397                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2398                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2399                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2400                 </links>
2401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2402                         <actions>
2403                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2404                                 <retrieve/>
2405                                 <update permission="UPDATE_MARC" global_required="true"/>
2406                                 <delete permission="UPDATE_MARC" global_required="true"/>
2407                         </actions>
2408                 </permacrud>
2409         </class>
2410         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2411                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2412                         <field name="char_encoding" />
2413                         <field name="id" />
2414                         <field name="record" />
2415                         <field name="record_status" />
2416                         <field name="thesaurus" />
2417                 </fields>
2418                 <links>
2419                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2420                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2421                 </links>
2422         </class>
2423         <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">
2424                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2425                         <field name="id" reporter:datatype="id" />
2426                         <field name="bib" reporter:datatype="link" />
2427                         <field name="authority" reporter:datatype="link" />
2428                 </fields>
2429                 <links>
2430                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2431                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2432                 </links>
2433         </class>
2434         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2436                         <field name="id" reporter:datatype="id" />
2437                         <field name="record" reporter:datatype="link" />
2438                         <field name="atag" reporter:datatype="link" />
2439                         <field name="value" reporter:datatype="text" />
2440                 </fields>
2441                 <links>
2442                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2443                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2444                 </links>
2445         </class>
2446         <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">
2447                 <fields oils_persist:primary="code" oils_persist:sequence="">
2448                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2449                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2450                 </fields>
2451                 <links/>
2452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2453             <actions>
2454                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2455                 <retrieve/>
2456                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2457                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2458             </actions>
2459         </permacrud>
2460         </class>
2461         <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">
2462                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2463                         <field name="accepting_usr" />
2464                         <field name="amount" reporter:datatype="money" />
2465                         <field name="amount_collected" reporter:datatype="money" />
2466                         <field name="approval_code" reporter:datatype="text"/>
2467                         <field name="cash_drawer" reporter:datatype="link"/>
2468                         <field name="cc_first_name" reporter:datatype="text"/>
2469                         <field name="cc_last_name" reporter:datatype="text"/>
2470                         <field name="cc_number" reporter:datatype="text"/>
2471                         <field name="cc_order_number" reporter:datatype="text"/>
2472                         <field name="cc_type" reporter:datatype="text"/>
2473                         <field name="cc_processor" reporter:datatype="text"/>
2474                         <field name="expire_month" reporter:datatype="int" />
2475                         <field name="expire_year" reporter:datatype="int" />
2476                         <field name="id" reporter:datatype="id" />
2477                         <field name="note" reporter:datatype="text"/>
2478                         <field name="payment_ts" reporter:datatype="timestamp"/>
2479                         <field name="xact" reporter:datatype="link"/>
2480                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2481                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2482                 </fields>
2483                 <links>
2484                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2485                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2486                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2487                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2488                 </links>
2489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2490             <actions>
2491                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2492                     <context link="xact" jump="usr" field="home_ou"/>
2493                 </retrieve>
2494                         </actions>
2495                 </permacrud>
2496         </class>
2497         <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">
2498                 <fields oils_persist:primary="name">
2499                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2500                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2501                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2502                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2503                 </fields>
2504                 <links/>
2505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2506             <actions>
2507                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2508                 <retrieve/>
2509                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2510                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2511             </actions>
2512         </permacrud>
2513         </class>
2514
2515         <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">
2516                 <fields oils_persist:primary="alias">
2517                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2518                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2519                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2520                 </fields>
2521                 <links>
2522                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2523                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2524                 </links>
2525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526             <actions>
2527                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2528                 <retrieve/>
2529                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2530                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2531             </actions>
2532         </permacrud>
2533         </class>
2534
2535         <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">
2536                 <fields oils_persist:primary="name">
2537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2538                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2539                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2540                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2541                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2542                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2543                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2544                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2545                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2546                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2547                 </fields>
2548                 <links>
2549                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2550                 </links>
2551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2552             <actions>
2553                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2554                 <retrieve/>
2555                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2556                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2557             </actions>
2558         </permacrud>
2559         </class>
2560
2561         <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">
2562                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2563                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2564                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2565                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2566                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2567                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2568                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2569                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2570                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2571                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2572                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2573                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2574                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2575                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2576                 </fields>
2577                 <links>
2578                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2579                 </links>
2580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2581             <actions>
2582                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2583                 <retrieve/>
2584                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2585                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2586             </actions>
2587         </permacrud>
2588         </class>
2589         <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">
2590                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2591                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2592                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2593                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2594                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2595                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2596                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2597                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2598                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2599                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2600                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2601                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2602                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2603                 </fields>
2604                 <links>
2605                 </links>
2606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607                         <actions>
2608                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2609                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2610                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2611                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2612                         </actions>
2613                 </permacrud>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2617                         <field name="id" reporter:datatype="id" />
2618                         <field name="name" reporter:datatype="text"/>
2619                         <field name="xpath" reporter:datatype="text"/>
2620                         <field name="format" reporter:datatype="link"/>
2621                         <field name="first_word" reporter:datatype="bool" />
2622                 </fields>
2623                 <links/>
2624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2625             <actions>
2626                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2627                 <retrieve/>
2628                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2629                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2630             </actions>
2631         </permacrud>
2632         </class>
2633         <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">
2634                 <fields oils_persist:primary="code" oils_persist:sequence="">
2635                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2636                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2637                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2638                 </fields>
2639                 <links/>
2640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2641             <actions>
2642                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2643                 <retrieve/>
2644                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2645                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2646             </actions>
2647         </permacrud>
2648         </class>
2649         <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">
2650                 <fields oils_persist:primary="code" oils_persist:sequence="">
2651                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2652                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2653                 </fields>
2654                 <links/>
2655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2656             <actions>
2657                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2658                 <retrieve/>
2659                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2660                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2661             </actions>
2662         </permacrud>
2663         </class>
2664     <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">
2665         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2666             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2667             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2668             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2669             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2670         </fields>
2671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2672             <actions>
2673                 <retrieve/>
2674             </actions>
2675         </permacrud>
2676     </class>
2677         <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">
2678                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2679                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2680                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2681                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2682                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2683                 </fields>
2684                 <links>
2685                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2686                 </links>
2687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2688             <actions>
2689                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2690                 <retrieve/>
2691                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2692                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2693             </actions>
2694         </permacrud>
2695         </class>
2696         <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">
2697                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2698                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2699                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2700                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2701                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2702                 </fields>
2703                 <links>
2704                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2705                 </links>
2706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707             <actions>
2708                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2709                 <retrieve/>
2710                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2711                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2717                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2718                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2719                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2720                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2721                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2722                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2723                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2724                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2725                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2726                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2727                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2728                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2729                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2730                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2731                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2732                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2733                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2734                 </fields>
2735                 <links>
2736                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2737                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2738                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2739                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2740                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2741                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2742                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2743                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2744                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2745                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2746                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2747                 </links>
2748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2749             <actions>
2750                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2751                 <retrieve/>
2752                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2753                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2754             </actions>
2755         </permacrud>
2756         </class>
2757         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2758                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2759                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2760                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2761                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2762                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2763                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2764                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2765                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2766                 </fields>
2767                 <links>
2768                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2769                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2770         </links>
2771         </class>
2772         <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">
2773                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2775                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2776                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2777                 </fields>
2778                 <links>
2779                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2780                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2781                 </links>
2782         </class>
2783         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2784                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2785                         <field name="id" reporter:datatype="id" />
2786                         <field name="value" oils_persist:i18n="true" />
2787                 </fields>
2788                 <links/>
2789         </class>
2790         <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">
2791                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2792                         <field name="balance_owed" reporter:datatype="money" />
2793                         <field name="total_owed" reporter:datatype="money" />
2794                         <field name="total_paid" reporter:datatype="money" />
2795                         <field name="usr" reporter:datatype="link"/>
2796                 </fields>
2797                 <links>
2798                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2799         </links>
2800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2801             <actions>
2802                 <retrieve permission="VIEW_USER">
2803                     <context link="usr" field="home_ou"/>
2804                 </retrieve>
2805             </actions>
2806         </permacrud>
2807         </class>
2808         <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">
2809                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2810                         <field name="collector" />
2811                         <field name="enter_time" reporter:datatype="timestamp"/>
2812                         <field name="id" reporter:datatype="id" />
2813                         <field name="location" reporter:datatype="link"/>
2814                         <field name="usr" reporter:datatype="link"/>
2815                 </fields>
2816                 <links>
2817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2818                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2819                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2820                 </links>
2821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2822             <actions>
2823                 <create permission="money.collections_tracker.create" context_field="location"/>
2824                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2825                 <delete permission="money.collections_tracker.create" context_field="location"/>
2826             </actions>
2827         </permacrud>
2828         </class>
2829         <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">
2830                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2831                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2832                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2833                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2834                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2835                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2836                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2837                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2838                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2839                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2840                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2841                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2842                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2843                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2844                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2845                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2846                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2847                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2848                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2849                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2850                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2851                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2852                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2853                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2857                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2858                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2859                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2860                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2861                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2862                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2863                 </fields>
2864                 <links>
2865                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2866                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2867                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2868                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2869                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2870                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2871                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2872                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2873                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2874                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2875                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2876                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2877                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2878                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2879                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2880                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2881                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2882                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2883                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2884                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2885                 </links>
2886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2889                 <retrieve/>
2890                 <update permission="UPDATE_MARC" global_required="true"/>
2891                 <!-- 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. -->
2892                 <delete permission="DELETE_RECORD" global_required="true"/>
2893             </actions>
2894         </permacrud>
2895         </class>
2896         <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">
2897                 <fields oils_persist:primary="id">
2898                         <field name="dow_0_close" />
2899                         <field name="dow_0_open" />
2900                         <field name="dow_1_close" />
2901                         <field name="dow_1_open" />
2902                         <field name="dow_2_close" />
2903                         <field name="dow_2_open" />
2904                         <field name="dow_3_close" />
2905                         <field name="dow_3_open" />
2906                         <field name="dow_4_close" />
2907                         <field name="dow_4_open" />
2908                         <field name="dow_5_close" />
2909                         <field name="dow_5_open" />
2910                         <field name="dow_6_close" />
2911                         <field name="dow_6_open" />
2912                         <field name="id" reporter:datatype="id" />
2913                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2914                 </fields>
2915                 <links>
2916                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2917                 </links>
2918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2919             <actions>
2920                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2921                 <retrieve/>
2922                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2923                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2924             </actions>
2925         </permacrud>
2926         </class>
2927         <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">
2928                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2929                         <field name="id" reporter:datatype="id" />
2930                         <field name="record" reporter:datatype="link"/>
2931                         <field name="label" reporter:datatype="text"/>
2932                         <field name="label_sortkey" reporter:datatype="text"/>
2933                 </fields>
2934                 <links>
2935                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2936                 </links>
2937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2938             <actions>
2939                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2940                 <retrieve/>
2941                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2942                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2943             </actions>
2944         </permacrud>
2945         </class>
2946         <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">
2947                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2948                         <field name="id" reporter:datatype="id" />
2949                         <field name="target_copy" reporter:datatype="link" />
2950                         <field name="part" reporter:datatype="link"/>
2951                 </fields>
2952                 <links>
2953                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2954                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2955                 </links>
2956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2957             <actions>
2958                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2959                 <retrieve/>
2960                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2961                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2962             </actions>
2963         </permacrud>
2964         </class>
2965         <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">
2966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2967                         <field name="close_end" reporter:datatype="timestamp" />
2968                         <field name="close_start" reporter:datatype="timestamp" />
2969                         <field name="id" reporter:datatype="id" />
2970                         <field name="org_unit" reporter:datatype="org_unit"/>
2971                         <field name="reason" reporter:datatype="text"/>
2972                 </fields>
2973                 <links>
2974                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2975                 </links>
2976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2977             <actions>
2978                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2979                 <retrieve/>
2980                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2981                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2982             </actions>
2983         </permacrud>
2984         </class>
2985         <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">
2986                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2987                         <field name="extended" reporter:datatype="interval"/>
2988                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2989                         <field name="max_renewals" reporter:datatype="int" />
2990                         <field name="name" reporter:datatype="text"/>
2991                         <field name="normal" reporter:datatype="interval"/>
2992                         <field name="shrt" reporter:datatype="interval"/>
2993                 </fields>
2994                 <links>
2995                 </links>
2996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2997             <actions>
2998                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2999                 <retrieve/>
3000                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3001                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3002             </actions>
3003         </permacrud>
3004         </class>
3005
3006         <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">
3007                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3008                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3009                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3010             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3011                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3012             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3013                 </fields>
3014                 <links>
3015             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3016                 </links>
3017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3018             <actions>
3019                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3020                 <retrieve/>
3021                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3022                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3023             </actions>
3024                 </permacrud>
3025         </class>
3026
3027         <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">
3028                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3029                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3030                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3031                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3032             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3033                 </fields>
3034                 <links>
3035                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3036                 </links>
3037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3038             <actions>
3039                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3040                 <retrieve/>
3041                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3042                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3043             </actions>
3044                 </permacrud>
3045         </class>
3046
3047         <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">
3048                 <fields oils_persist:primary="id" oils_persist:sequence="">
3049                         <field name="balance_owed" reporter:datatype="money"/>
3050                         <field name="id" reporter:datatype="id" />
3051                         <field name="last_billing_note" reporter:datatype="text"/>
3052                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3053                         <field name="last_billing_type" reporter:datatype="text"/>
3054                         <field name="last_payment_note" reporter:datatype="text"/>
3055                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3056                         <field name="last_payment_type" reporter:datatype="text"/>
3057                         <field name="total_owed" reporter:datatype="money"/>
3058                         <field name="total_paid" reporter:datatype="money"/>
3059                         <field name="usr" reporter:datatype="link"/>
3060                         <field name="xact_finish" reporter:datatype="timestamp" />
3061                         <field name="xact_start" reporter:datatype="timestamp" />
3062                         <field name="xact_type" reporter:datatype="text"/>
3063                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3064                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3065                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3066                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3067                         <field name="billing_location" reporter:datatype="link"/>
3068                 </fields>
3069                 <links>
3070                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3071                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3072                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3073                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3074                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3075                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3076                 </links>
3077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3078                         <actions>
3079                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3080                                         <context link="usr" field="home_ou" />
3081                                 </retrieve>
3082                         </actions>
3083                 </permacrud>
3084         </class>
3085         <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">
3086                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3087                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3095                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3096                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3097                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3099                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3100                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3101                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3102                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3103                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3104                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3105                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3106                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3107                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3108                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3109                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3110                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3111                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3112                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3113                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3114                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3115                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3116                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3117                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3118                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3119                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3120                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3121                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3122                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3123                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3124                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3125                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3126                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3127                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3128                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3129                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3130                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3131                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3132                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3133                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3134                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3135                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3136                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3137                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3138                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3140                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3141                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3142                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3143                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3144                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3146                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3148                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3149                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3150                 </fields>
3151                 <links>
3152                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3153                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3154                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3155                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3156                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3157                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3158                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3159                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3160                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3161                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3162                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3163                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3164                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3165                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3166                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3167                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3168                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3169                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3170                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3171                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3172                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3173                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3174                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3175                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3176                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3177                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3178                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3179                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3180                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3181                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3182                 </links>
3183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3184                         <actions>
3185                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3186                         </actions>
3187                 </permacrud>
3188         </class>
3189         <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">
3190                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3191                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3192                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3193                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3194                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3195                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3196                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3197                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3198                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3199         </fields>
3200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3201                         <actions>
3202                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3203                                 <retrieve/>
3204                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3205                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3206                         </actions>
3207                 </permacrud>
3208         </class>
3209         <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">
3210                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3211                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3212                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3213                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3214                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3215         </fields>
3216         <links>
3217                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3218                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3219                 </links>
3220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3221                         <actions>
3222                                 <retrieve permission="RUN_REPORTS">
3223                                         <context link="usr" field="home_ou" />
3224                                 </retrieve>
3225                         </actions>
3226                 </permacrud>
3227         </class>
3228         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3229                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3230                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3231                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3232                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3233                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3234                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3235                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3236         </fields>
3237         <links>
3238                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3239                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3240                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3241                 </links>
3242                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3243                         <actions>
3244                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3245                                         <context link="usr" field="home_ou" />
3246                                         <context link="ws" field="owning_lib" />
3247                                 </retrieve>
3248                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3249                                         <context link="usr" field="home_ou" />
3250                                         <context link="ws" field="owning_lib" />
3251                                 </create>
3252                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3253                                         <context link="usr" field="home_ou" />
3254                                         <context link="ws" field="owning_lib" />
3255                                 </update>
3256                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3257                                         <context link="usr" field="home_ou" />
3258                                         <context link="ws" field="owning_lib" />
3259                                 </delete>
3260                         </actions>
3261                 </permacrud>
3262         </class>
3263         <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">
3264                 <fields oils_persist:primary="name">
3265                         <field name="name" reporter:datatype="text"/>
3266                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3267                 </fields>
3268                 <links/>
3269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270                         <actions>
3271                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3272                                 <retrieve/>
3273                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3274                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3275                         </actions>
3276                 </permacrud>
3277         </class>
3278         <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">
3279                 <fields oils_persist:primary="name">
3280                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3281                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3282                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3283                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3284                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3285                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3286                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3287                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3288                 </fields>
3289                 <links>
3290                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3291                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3292                 </links>
3293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294                         <actions>
3295                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3296                                 <retrieve/>
3297                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3298                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3299                         </actions>
3300                 </permacrud>
3301         </class>
3302         <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">
3303                 <fields oils_persist:primary="name">
3304                         <field name="name" reporter:datatype="text"/>
3305                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3306                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3307                         <field name="datatype" reporter:datatype="text"/>
3308                         <field name="view_perm" reporter:datatype="link"/>
3309                         <field name="update_perm" reporter:datatype="link"/>
3310                         <field name="fm_class" reporter:datatype="text"/>
3311                         <field name="grp" reporter:datatype="link"/>
3312                 </fields>
3313                 <links>
3314                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3315                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3316                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3317                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3318                 </links>
3319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3320                         <actions>
3321                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3322                                 <retrieve/>
3323                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3324                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3325                         </actions>
3326                 </permacrud>
3327         </class>
3328         <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">
3329                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3330                         <field name="id" />
3331                         <field name="name"  reporter:datatype="text"/>
3332                         <field name="org_unit" reporter:datatype="org_unit"/>
3333                         <field name="value"  reporter:datatype="text"/>
3334                 </fields>
3335                 <links>
3336                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3337                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3338                 </links>
3339         </class>
3340         <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">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3342                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3343                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3344                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3345                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3346                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3347                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3348                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3349                 </fields>
3350                 <links>
3351                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3352                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3353                 </links>
3354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355             <actions>
3356                 <create permission="CREATE_COPY_NOTE">
3357                     <context link="owning_copy" field="circ_lib"/>
3358                 </create>
3359                 <retrieve permission="VIEW_COPY_NOTES">
3360                     <context link="owning_copy" field="circ_lib"/>
3361                 </retrieve>
3362                 <update permission="UPDATE_COPY_NOTE">
3363                     <context link="owning_copy" field="circ_lib"/>
3364                 </update>
3365                 <delete permission="DELETE_COPY_NOTE">
3366                     <context link="owning_copy" field="circ_lib"/>
3367                 </delete>
3368             </actions>
3369         </permacrud>
3370         </class>
3371         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3372                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3373                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3374                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3375                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3376                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3377                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3378                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3379                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3380                 </fields>
3381                 <links>
3382                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3383                 </links>
3384         </class>
3385         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3386                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3387                         <field name="fingerprint"  reporter:datatype="text"/>
3388                         <field name="id" reporter:datatype="id" />
3389                         <field name="master_record" reporter:datatype="link"/>
3390                         <field name="mods"  reporter:datatype="text"/>
3391                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3392                 </fields>
3393                 <links>
3394                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3395                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3396                 </links>
3397         </class>
3398         <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">
3399                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3400                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3401                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3402                 </fields>
3403                 <links/>
3404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3405             <actions>
3406                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3407                 <retrieve/>
3408                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3409                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3410             </actions>
3411         </permacrud>
3412         </class>
3413         <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">
3414                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3415                         <field name="code"  reporter:datatype="text"/>
3416                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3417                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3418                 </fields>
3419                 <links/>
3420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3421             <actions>
3422                 <create permission="CREATE_PERM" global_required="true"/>
3423                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3424                 <update permission="UPDATE_PERM" global_required="true"/>
3425                 <delete permission="DELETE_PERM" global_required="true"/>
3426             </actions>
3427         </permacrud>
3428         </class>
3429         <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">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3431                         <field name="id" reporter:datatype="id" />
3432                         <field name="metarecord" reporter:datatype="link"/>
3433                         <field name="source" reporter:datatype="link"/>
3434                 </fields>
3435                 <links>
3436                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3437                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3438                 </links>
3439         </class>
3440         <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">
3441                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3442                         <field name="id" reporter:datatype="id" />
3443                         <field name="field" reporter:datatype="link"/>
3444                         <field name="source" reporter:datatype="link"/>
3445                         <field name="value"  reporter:datatype="text"/>
3446                 </fields>
3447                 <links>
3448                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3449                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3450                 </links>
3451         </class>
3452         <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">
3453                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3454                         <field name="id" reporter:datatype="id" />
3455                         <field name="value" reporter:datatype="text"/>
3456                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3457                 </fields>
3458                 <links>
3459                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3460                 </links>
3461         </class>
3462         <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">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3464                         <field name="id" reporter:datatype="id" />
3465                         <field name="entry" reporter:datatype="link"/>
3466                         <field name="def" reporter:datatype="link"/>
3467                         <field name="source" reporter:datatype="link"/>
3468                 </fields>
3469                 <links>
3470                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3471                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3472                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3473                 </links>
3474         </class>
3475         <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">
3476                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3477                         <field name="id" reporter:datatype="id" />
3478                         <field name="entry" reporter:datatype="link"/>
3479                         <field name="simple_heading" reporter:datatype="link"/>
3480                 </fields>
3481                 <links>
3482                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3483                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3484                 </links>
3485         </class>
3486         <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">
3487                 <oils_persist:source_definition>
3488                         SELECT * FROM metabib.author_field_entry
3489                                                 UNION ALL
3490                         SELECT * FROM metabib.keyword_field_entry
3491                                                 UNION ALL
3492                         SELECT * FROM metabib.identifier_field_entry
3493                                                 UNION ALL
3494                         SELECT * FROM metabib.title_field_entry
3495                                                 UNION ALL
3496                         SELECT * FROM metabib.subject_field_entry
3497                                                 UNION ALL
3498                         SELECT * FROM metabib.series_field_entry
3499                 </oils_persist:source_definition>
3500                 <fields>
3501                         <field name="field" reporter:datatype="link"/>
3502                         <field name="id" reporter:datatype="id" />
3503                         <field name="source" reporter:datatype="link"/>
3504                         <field name="value"  reporter:datatype="text"/>
3505                 </fields>
3506                 <links>
3507                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3508                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3509                 </links>
3510         </class>
3511         <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">
3512                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3513                         <field name="field" reporter:datatype="link"/>
3514                         <field name="id" reporter:datatype="id" />
3515                         <field name="source" reporter:datatype="link"/>
3516                         <field name="value"  reporter:datatype="text"/>
3517                 </fields>
3518                 <links>
3519                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3520                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3521                 </links>
3522         </class>
3523         <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">
3524                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3525                         <field name="accepting_usr" reporter:datatype="link"/>
3526                         <field name="amount" reporter:datatype="money" />
3527                         <field name="amount_collected" reporter:datatype="money" />
3528                         <field name="cash_drawer" reporter:datatype="link"/>
3529                         <field name="id" reporter:datatype="id" />
3530                         <field name="note"  reporter:datatype="text"/>
3531                         <field name="payment_ts" reporter:datatype="timestamp"/>
3532                         <field name="xact" reporter:datatype="link"/>
3533                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3534                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3535                 </fields>
3536                 <links>
3537                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3538                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3539                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3540                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3541                 </links>
3542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3543             <actions>
3544                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3545                     <context link="xact" jump="usr" field="home_ou"/>
3546                 </retrieve>
3547                         </actions>
3548                 </permacrud>
3549         </class>
3550         <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">
3551                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3552                         <field name="accepting_usr" reporter:datatype="link"/>
3553                         <field name="amount" reporter:datatype="money" />
3554                         <field name="amount_collected" reporter:datatype="money" />
3555                         <field name="id" reporter:datatype="id" />
3556                         <field name="note"  reporter:datatype="text"/>
3557                         <field name="payment_ts" reporter:datatype="timestamp"/>
3558                         <field name="xact" reporter:datatype="link"/>
3559                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3560                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3561                 </fields>
3562                 <links>
3563                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3564                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3565                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3566                 </links>
3567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3568             <actions>
3569                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3570                     <context link="xact" jump="usr" field="home_ou"/>
3571                 </retrieve>
3572                         </actions>
3573                 </permacrud>
3574         </class>
3575         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3576                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3577                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3578                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3579                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3580                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3581                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3582                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3583                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3584                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3585                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3586                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3587                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3588                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3589                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3590                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3591                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3592                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3593                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3594                 </fields>
3595                 <links>
3596                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3597                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3598                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3599                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3600                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3601                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3602                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3603                 </links>
3604         </class>
3605
3606         <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">
3607                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3608                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3609                         <field name="name"  reporter:datatype="text"/>
3610                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3611                         <field name="block_list" reporter:datatype="text"/>
3612                         <field name="staff_alert" reporter:datatype="bool"/>
3613                         <field name="org_depth" reporter:datatype="int"/>
3614                 </fields>
3615                 <links/>
3616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3617             <actions>
3618                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3619                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3620                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3621                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3622             </actions>
3623         </permacrud>
3624         </class>
3625         <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">
3626                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3627                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3628                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3629                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3630                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3631                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3632                 </fields>
3633                 <links>
3634                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3635                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3636                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3637         </links>
3638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3639             <actions>
3640                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3641                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3642                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3643                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3644             </actions>
3645         </permacrud>
3646         </class>
3647         <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">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3649                         <field name="holdable" reporter:datatype="bool"/>
3650                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3651                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3652                         <field name="opac_visible" reporter:datatype="bool"/>
3653             <field name="copy_active" reporter:datatype="bool"/>
3654             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3655                 </fields>
3656                 <links/>
3657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3658             <actions>
3659                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3660                 <retrieve/>
3661                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3662                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3663             </actions>
3664         </permacrud>
3665         </class>
3666         <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">
3667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3668                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3669                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3670                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3671                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3672                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3673                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3674                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3675                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3676                 </fields>
3677                 <links>
3678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3679                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3680                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3681                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3682                 </links>
3683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3684                         <actions>
3685                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3686                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3687                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3688                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3689                         </actions>
3690                 </permacrud>
3691         </class>
3692         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3693                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3694                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3695                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3696                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3697                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3698                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3699                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3700                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3701                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3702                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3703                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3704                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3705                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3706                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3707                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3708                 </fields>
3709                 <links>
3710                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3711                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3712                 </links>
3713         </class>
3714         <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">
3715                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3716                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3717                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3718                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3719                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3720                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3721                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3722                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3723                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3724                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3725                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3726                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3727                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3728                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3729                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3730                 </fields>
3731                 <links>
3732                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3733                 </links>
3734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3735                         <actions>
3736                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3737                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3738                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3739                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3740                         </actions>
3741                 </permacrud>
3742         </class>
3743
3744
3745         <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">
3746                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3748                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3749                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3750                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3751                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3752                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3753                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3754                 </fields>
3755                 <links>
3756                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3757                 </links>
3758         </class>
3759
3760         <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">
3761                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3762                         <field name="call_number" />
3763                         <field name="create_date" reporter:datatype="timestamp"/>
3764                         <field name="creator" reporter:datatype="link"/>
3765                         <field name="id" reporter:datatype="id" />
3766                         <field name="pub" reporter:datatype="bool"/>
3767                         <field name="title"  reporter:datatype="text"/>
3768                         <field name="value"  reporter:datatype="text"/>
3769                 </fields>
3770                 <links>
3771                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3772                 </links>
3773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3774             <actions>
3775                 <create permission="CREATE_VOLUME_NOTE">
3776                     <context link="call_number" field="owning_lib"/>
3777                 </create>
3778                 <retrieve permission="VIEW_VOLUME_NOTES">
3779                     <context link="call_number" field="owning_lib"/>
3780                 </retrieve>
3781                 <update permission="UPDATE_VOLUME_NOTE">
3782                     <context link="call_number" field="owning_lib"/>
3783                 </update>
3784                 <delete permission="DELETE_VOLUME_NOTE">
3785                     <context link="call_number" field="owning_lib"/>
3786                 </delete>
3787             </actions>
3788         </permacrud>
3789         </class>
3790         <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">
3791                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3792                         <field name="create_date" reporter:datatype="timestamp"/>
3793                         <field name="creator" reporter:datatype="link"/>
3794                         <field name="edit_date" reporter:datatype="timestamp"/>
3795                         <field name="editor" reporter:datatype="link"/>
3796                         <field name="id" reporter:datatype="id" />
3797                         <field name="record" reporter:datatype="link"/>
3798                         <field name="value" reporter:datatype="text"/>
3799                 </fields>
3800                 <links>
3801                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3802                 </links>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3806                 <retrieve/>
3807                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3808                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3809             </actions>
3810         </permacrud>
3811         </class>
3812         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3813         <oils_persist:source_definition>
3814 SELECT  usr,
3815         SUM(
3816             CASE
3817                 WHEN (
3818                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3819                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3820                 ) THEN 1
3821                 ELSE 0
3822             END
3823         ) AS out,
3824
3825         SUM(
3826             CASE
3827                 WHEN (
3828                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3829                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3830                 ) THEN 1
3831                 ELSE 0
3832             END
3833         ) AS overdue,
3834
3835         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3836         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3837         SUM( CASE WHEN stop_fines = 'LONGOVERDUE' THEN 1 ELSE 0 END) AS long_overdue
3838   FROM  action.circulation
3839   WHERE checkin_time IS NULL
3840   GROUP BY 1
3841         </oils_persist:source_definition>
3842         <fields oils_persist:primary="usr">
3843             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3844             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3845             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3846             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3847             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3848             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3849         </fields>
3850         <links>
3851             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3852         </links>
3853         </class>
3854         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3855         <oils_persist:source_definition>
3856 SELECT  usr,
3857         STRING_AGG(
3858             CASE
3859                 WHEN (
3860                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3861                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3862                 ) THEN id::TEXT
3863                 ELSE '0'
3864             END
3865         ,',') AS out,
3866
3867         STRING_AGG(
3868             CASE
3869                 WHEN (
3870                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3871                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3872                 ) THEN id::TEXT
3873                 ELSE '0'
3874             END
3875         ,',') AS overdue,
3876
3877         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3878         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3879         STRING_AGG( CASE WHEN stop_fines = 'LONGOVERDUE' THEN id::TEXT ELSE '0' END,',') AS long_overdue
3880   FROM  action.circulation
3881   WHERE checkin_time IS NULL
3882   GROUP BY 1
3883         </oils_persist:source_definition>
3884         <fields oils_persist:primary="usr">
3885             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3886             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3887             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3888             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3889             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3890             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3891         </fields>
3892         <links>
3893             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3894         </links>
3895         </class>
3896         <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">
3897                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3898                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3899                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3900                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3901                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3902                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3903                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3904                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3905                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3906                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3907                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3908                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3909                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3910                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3911                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3912                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3913                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3914                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3915                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3916                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3917                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3918                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3919                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3920                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3921                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3922                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
3923                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3924                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3925                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3926                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3927                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3928                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3932                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3933                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3934                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3935                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3936                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3937                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3938                 </fields>
3939                 <links>
3940                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3941                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3942                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3943                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3944                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3946                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3947                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3948                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3949                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3950                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3951                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3952                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3953                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3954                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3955                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3956                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3957                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3958                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3959                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3960                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3961                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3962                 </links>
3963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3964                         <actions>
3965                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3966                         </actions>
3967                 </permacrud>
3968         </class>
3969         <class id="combcirc" controller="open-ils.cstore" 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">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3971                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3972                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3973                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3974                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3975                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3976                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3977                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3978                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3979                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3980                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3981                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3982                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3983                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3984                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3985                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3986                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3987                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3988                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3989                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3990                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3991                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3992                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3993                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3994                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3995                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
3996                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3997                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3998                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3999                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4000                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4001                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4002                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4003                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4004                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4005                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4006                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4007                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4008                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4009                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4010                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4011                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4012                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4013                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4014                 </fields>
4015                 <links>
4016                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4017                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4018                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4019                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4020                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4021                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4022                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4023                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4024                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4025                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4026                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4027                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4028                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4029                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4030                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4031                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4032                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4033                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4034                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4035                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4036                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4037                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4038                 </links>
4039         </class>
4040         <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">
4041                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4042                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4043                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4044                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4045                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4046                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4047                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4048                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4050                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4051                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4052                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4053                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4054                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4055                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4056                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4057                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4058                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4059                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4060                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4061                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4062                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4063                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4064                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4065                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4066                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4067                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4068                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4069                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4070                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4071                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4072                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4075                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4076                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4077                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4078                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4079                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4080                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4081                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4082                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4083                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4084                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4085                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4086                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4088                 </fields>
4089                 <links>
4090                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4091                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4092                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4093                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4094                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4095                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4098                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4099                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4100                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4101                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4102                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4103                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4104                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4105                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4106                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4107                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4108                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4109                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4110                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4111                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4112                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4113                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4114                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4115                 </links>
4116         </class>
4117
4118         <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">
4119                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4120                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4121                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4122                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4123                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4124                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4125                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4126                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4127                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4128                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4129                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4130                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4131                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4132                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4133                 </fields>
4134                 <links>
4135                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4136                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4137                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4138                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4139                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4140                 </links>
4141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4142                         <actions>
4143                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4144                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4145                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4146                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4147                         </actions>
4148                 </permacrud>
4149         </class>
4150
4151         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4152                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4153                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4154                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4155                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4156                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4157                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4158                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4159                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4160                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4161                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4162                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4163                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4164                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4165                 </fields>
4166                 <links>
4167                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4168                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4169                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4170                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4171                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4172                 </links>
4173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4174                         <actions>
4175                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4176                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4177                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4178                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4179                         </actions>
4180                 </permacrud>
4181         </class>
4182         
4183         <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">
4184                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4185                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4186                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4187                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4188                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4189                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4190                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4191                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4192                 </fields>
4193                 <links>
4194                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4195                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4196                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4197                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4198                 </links>
4199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4200                         <actions>
4201                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4202                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4203                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4204                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4205                         </actions>
4206                 </permacrud>
4207         </class>
4208         
4209         <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">
4210                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4211                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4212                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4213                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4214                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4215                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4216                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4217                 </fields>
4218                 <links>
4219                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4220                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4221                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4222                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4223                 </links>
4224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4225                         <actions>
4226                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4227                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4228                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4229                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4230                         </actions>
4231                 </permacrud>
4232         </class>
4233         
4234         <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">
4235                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4236                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4237                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4238                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4239                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4240                 </fields>
4241                 <links>
4242                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4243                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4244                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4245                 </links>
4246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4247                         <actions>
4248                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4249                     <context link="resource" field="owner" />
4250                 </create>
4251                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4252                     <context link="resource" field="owner" />
4253                 </retrieve>
4254                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4255                     <context link="resource" field="owner" />
4256                 </update>
4257                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4258                     <context link="resource" field="owner" />
4259                 </delete>
4260                         </actions>
4261                 </permacrud>
4262         </class>
4263         
4264         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4266                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4267                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4268                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4269                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4270                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4271                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4272                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4273                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4274                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4275                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4276                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4277                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4278                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4279                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4280                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4281                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4282                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4283                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4284                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4285                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4286                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4287                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4288                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4289                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4290                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4291                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4292                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4293                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4294                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4295                 </fields>
4296                 <links>
4297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4298                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4299                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4300                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4301                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4302                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4303                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4304                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4305                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4306                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4307                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4308                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4309                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4310                 </links>
4311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4312                         <actions>
4313                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4314                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4315                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4316                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4317                         </actions>
4318                 </permacrud>
4319         </class>
4320         
4321         <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">
4322                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4323                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4324                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4325                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4326                 </fields>
4327                 <links>
4328                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4329                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4330                 </links>
4331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4332                         <actions>
4333                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4334                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4335                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4336                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4337                         </actions>
4338                 </permacrud>
4339         </class>
4340
4341         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4342                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4343                         <field name="bucket" reporter:datatype="link"/>
4344                         <field name="id" reporter:datatype="id" />
4345                         <field name="target_call_number" reporter:datatype="link" />
4346                         <field name="create_time" reporter:datatype="timestamp" />
4347                         <field name="pos" reporter:datatype="int" />
4348                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4349                 </fields>
4350                 <links>
4351                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4352                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4353             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4354                 </links>
4355         </class>
4356         <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">
4357                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4358                         <field name="id" reporter:datatype="id" />
4359                         <field name="item" reporter:datatype="link"/>
4360                         <field name="note" reporter:datatype="text" />
4361                 </fields>
4362                 <links>
4363                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4364                 </links>
4365         </class>
4366         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4368                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4369                         <field name="btype" reporter:datatype="text"/>
4370                         <field name="id" reporter:datatype="id" />
4371                         <field name="name" reporter:datatype="text"/>
4372                         <field name="description" reporter:datatype="text"/>
4373                         <field name="owner" reporter:datatype="link"/>
4374                         <field name="pub" reporter:datatype="bool"/>
4375                         <field name="create_time" reporter:datatype="timestamp" />
4376                 </fields>
4377                 <links>
4378                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4379                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4380                 </links>
4381         </class>
4382         <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">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4384                         <field name="id" reporter:datatype="id" />
4385                         <field name="bucket" reporter:datatype="link"/>
4386                         <field name="note" reporter:datatype="text" />
4387                 </fields>
4388                 <links>
4389                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4390                 </links>
4391         </class>
4392         <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">
4393                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4394                         <field name="hold" reporter:datatype="link"/>
4395                         <field name="id" reporter:datatype="id" />
4396                         <field name="target_copy" reporter:datatype="link"/>
4397                         <field name="proximity" reporter:datatype="number"/>
4398                 </fields>
4399                 <links>
4400                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4401                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4402                 </links>
4403         </class>
4404         <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">
4405                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4406                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4407                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4408                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4409                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4410                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4411                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4412                 </fields>
4413                 <links>
4414                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4415                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4416                 </links>
4417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4418             <actions>
4419                 <create permission="CREATE_HOLD_NOTIFICATION">
4420                                         <context link="hold" jump="usr" field="home_ou" />
4421                                 </create>
4422                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4423                                         <context link="hold" jump="usr" field="home_ou" />
4424                                 </retrieve>
4425                 <update permission="CREATE_HOLD_NOTIFICATION">
4426                                         <context link="hold" jump="usr" field="home_ou" />
4427                                 </update>
4428                 <delete permission="CREATE_HOLD_NOTIFICATION">
4429                                         <context link="hold" jump="usr" field="home_ou" />
4430                                 </delete>
4431             </actions>
4432         </permacrud>
4433         </class>
4434         <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">
4435                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4436                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4437                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4438                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4439                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4440                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4441                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4442                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4443                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4444                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4445                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4446                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4447                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4448                 </fields>
4449                 <links>
4450                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4451                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4452                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4453                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4454                 </links>
4455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4456             <actions>
4457                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4458                 <retrieve/>
4459                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4460                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4461             </actions>
4462         </permacrud>
4463         </class>
4464         <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">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4466                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4467                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4468                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4469                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4470             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4471             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4472             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4473                 </fields>
4474                 <links>
4475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4476                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4477                 </links>
4478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4479             <actions>
4480                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4481                 <retrieve/>
4482                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4483                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4484             </actions>
4485         </permacrud>
4486         </class>
4487         <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">
4488                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4489                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4490             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4491             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4492                 </fields>
4493                 <links>
4494                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4495                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4496                 </links>
4497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4498             <actions>
4499                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4500                                         <context link="lgroup" field="owner" />
4501                 </create>
4502                 <retrieve/>
4503                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4504                                         <context link="lgroup" field="owner" />
4505                 </update>
4506                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4507                                         <context link="lgroup" field="owner" />
4508                 </delete>
4509             </actions>
4510         </permacrud>
4511         </class>
4512
4513     <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">
4514         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4515             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4516             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4517             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4518             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4519         </fields>
4520         <links>
4521             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4522             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4523         </links>
4524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4525             <actions>
4526                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4527                 <retrieve/>
4528                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4529                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4530             </actions>
4531         </permacrud>
4532     </class>
4533
4534         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4535                 <fields>
4536                         <field name="sre_id" oils_persist:virtual="true" />
4537                         <field name="location" oils_persist:virtual="true" />
4538                         <field name="owning_lib" oils_persist:virtual="true" />
4539                         <field name="basic_holdings" oils_persist:virtual="true" />
4540                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4541                         <field name="supplement_holdings" oils_persist:virtual="true" />
4542                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4543                         <field name="index_holdings" oils_persist:virtual="true" />
4544                         <field name="index_holdings_add" oils_persist:virtual="true" />
4545                         <field name="online" oils_persist:virtual="true" />
4546                         <field name="missing" oils_persist:virtual="true" />
4547                         <field name="incomplete" oils_persist:virtual="true" />
4548                 </fields>
4549         </class>
4550
4551         <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">
4552                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4553                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4554                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4555                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4556                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4557                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4558                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4559                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4560                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4561                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4562                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4563                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4564                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4565                 </fields>
4566                 <links>
4567                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4568                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4569                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4570                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4571                 </links>
4572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4573                         <actions>
4574                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4575                                 <retrieve/>
4576                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4577                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4578                         </actions>
4579                 </permacrud>
4580         </class>
4581
4582         <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">
4583                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4584                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4585                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4586                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4587                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4588                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4589                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4590                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4591                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4592                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4593                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4594                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4595                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4596                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4597                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4598                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4599                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4600                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4601                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4602                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4603                 </fields>
4604                 <links>
4605                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4606                 </links>
4607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4608                         <actions>
4609                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4610                                         <context link="subscription" field="owning_lib" />
4611                                 </create>
4612                                 <retrieve />
4613                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4614                                         <context link="subscription" field="owning_lib" />
4615                                 </update>
4616                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4617                                         <context link="subscription" field="owning_lib" />
4618                                 </delete>
4619                         </actions>
4620                 </permacrud>
4621         </class>
4622
4623         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4624                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4625                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4626                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4627                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4628                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4629                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4630                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4631                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4632                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4633                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4634                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4635                 </fields>
4636                 <links>
4637                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4638                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4639                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4640                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4641                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4642                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4643                 </links>
4644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4645                         <actions>
4646                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4647                                 <retrieve />
4648                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4649                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4650                         </actions>
4651                 </permacrud>
4652         </class>
4653
4654         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4655                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4656                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4657                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4658                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4659                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4660                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4661                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4662                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4663                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4664                 </fields>
4665                 <links>
4666                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4667                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4668                 </links>
4669         </class>
4670
4671         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4672                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4673                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4674                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4675                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4676                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4677                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4678                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4679                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4680                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4681                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4682                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4683                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4684                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4685                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4686                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4687                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4688                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4689                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4690                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4691                 </fields>
4692                 <links>
4693                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4694                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4695                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4696                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4697                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4698                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4699                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4700                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4701                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4702                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4703                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4704                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4705                 </links>
4706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4707                         <actions>
4708                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4709                                 <retrieve />
4710                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4711                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4712                         </actions>
4713                 </permacrud>
4714         </class>
4715
4716         <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">
4717                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4718                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4719                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4720                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4721                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4722                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4723                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4724                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4725                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4726                 </fields>
4727                 <links>
4728                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4729                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4730                 </links>
4731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4732                         <actions>
4733                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4734                                         <context link="distribution" field="holding_lib" />
4735                                 </create>
4736                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4737                                         <context link="distribution" field="holding_lib" />
4738                                 </retrieve>
4739                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4740                                         <context link="distribution" field="holding_lib" />
4741                                 </update>
4742                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4743                                         <context link="distribution" field="holding_lib" />
4744                                 </delete>
4745                         </actions>
4746                 </permacrud>
4747         </class>
4748
4749         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4751                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4752                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4753                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4754                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4755                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4756                 </fields>
4757                 <links>
4758                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4759                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4760                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4761                 </links>
4762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4763                         <actions>
4764                                 <create permission="ADMIN_SERIAL_STREAM">
4765                                         <context link="distribution" field="holding_lib" />
4766                                 </create>
4767                                 <retrieve />
4768                                 <update permission="ADMIN_SERIAL_STREAM">
4769                                         <context link="distribution" field="holding_lib" />
4770                                 </update>
4771                                 <delete permission="ADMIN_SERIAL_STREAM">
4772                                         <context link="distribution" field="holding_lib" />
4773                                 </delete>
4774                         </actions>
4775                 </permacrud>
4776         </class>
4777
4778         <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">
4779                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4780                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4781                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4782                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4783                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4784                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4785                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4786                 </fields>
4787                 <links>
4788                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4789                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4790                 </links>
4791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792                         <actions>
4793                                 <create permission="ADMIN_SERIAL_STREAM">
4794                                         <context link="stream" jump="distribution" field="holding_lib" />
4795                                 </create>
4796                                 <retrieve permission="RECEIVE_SERIAL">
4797                                         <context link="stream" jump="distribution" field="holding_lib" />
4798                                 </retrieve>
4799                                 <update permission="ADMIN_SERIAL_STREAM">
4800                                         <context link="stream" jump="distribution" field="holding_lib" />
4801                                 </update>
4802                                 <delete permission="ADMIN_SERIAL_STREAM">
4803                                         <context link="stream" jump="distribution" field="holding_lib" />
4804                                 </delete>
4805                         </actions>
4806                 </permacrud>
4807         </class>
4808
4809         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4810                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4811                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4812                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4813                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4814                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4815                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4816                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4817                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4818                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4819                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4820                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4821                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4822                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4823                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4824                 </fields>
4825                 <links>
4826                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4827                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4828                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4829                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4830                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4831                 </links>
4832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4833                         <actions>
4834                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4835                                         <context link="subscription" field="owning_lib" />
4836                                 </create>
4837                                 <retrieve/>
4838                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4839                                         <context link="subscription" field="owning_lib" />
4840                                 </update>
4841                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4842                                         <context link="subscription" field="owning_lib" />
4843                                 </delete>
4844                         </actions>
4845                 </permacrud>
4846         </class>
4847
4848         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4849                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4851                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4852                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4853                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4854                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4855                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4856                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4857                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4858                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4859                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4860                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4861                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4862                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4863                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4864                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4865                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4866                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4867                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4868                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4869                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4870                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4871                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4872                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4873                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4874                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4875                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4876                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4877                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4878                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4879                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4880                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4881                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4882                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4883                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4884                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4885                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4886                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4887                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4888                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4889                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4890                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4891                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4892                 </fields>
4893                 <links>
4894                         <link field="age_protect" reltype="might_have" key="id" map="" class="crahp"/>
4895                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4896                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4897                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4898                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4899                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4900                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4901                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4902                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4903                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4904                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4905                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4906                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4907                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4908                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4909                 </links>
4910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4911                         <actions>
4912                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4913                                 <retrieve/>
4914                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4915                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4916                         </actions>
4917                 </permacrud>
4918         </class>
4919
4920         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4921                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4922                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4923                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4924                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4925                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4926                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4927                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4928                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4929                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4930                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4931                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4932                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4933                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4934                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4936                 </fields>
4937                 <links>
4938                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4939                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4940                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4941                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4942                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4943                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4944                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4945                 </links>
4946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4947                         <actions>
4948                                 <create permission="ADMIN_SERIAL_ITEM">
4949                                         <context link="stream" jump="distribution" field="holding_lib" />
4950                                 </create>
4951                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4952                                         <context link="stream" jump="distribution" field="holding_lib" />
4953                                 </retrieve>
4954                                 <update permission="ADMIN_SERIAL_ITEM">
4955                                         <context link="stream" jump="distribution" field="holding_lib" />
4956                                 </update>
4957                                 <delete permission="ADMIN_SERIAL_ITEM">
4958                                         <context link="stream" jump="distribution" field="holding_lib" />
4959                                 </delete>
4960                         </actions>
4961                 </permacrud>
4962         </class>
4963
4964         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4965                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4966                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4967                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4968                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4969                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4970                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4971                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4972                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4973                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4974                 </fields>
4975                 <links>
4976                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4977                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4978                 </links>
4979                 <!-- Not available via PCRUD at this time -->
4980         </class>
4981         <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">
4982                 <fields>
4983                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4984                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4985                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4986                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4987                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4988                 </fields>
4989                 <links>
4990                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4991                 </links>
4992         </class>
4993         <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">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4995                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4996                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4997                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4998                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4999                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5000                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5001                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5002                 </fields>
5003                 <links>
5004                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5005                 </links>
5006         </class>
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5009                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5010                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5011                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5012                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5013                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5014                 </fields>
5015                 <links>
5016                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5017                 </links>
5018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5019                         <actions>
5020                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5021                                         <context link="distribution" field="holding_lib" />
5022                                 </create>
5023                                 <retrieve/>
5024                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5025                                         <context link="distribution" field="holding_lib" />
5026                                 </update>
5027                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5028                                         <context link="distribution" field="holding_lib" />
5029                                 </delete>
5030                         </actions>
5031                 </permacrud>
5032         </class>
5033
5034         <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">
5035                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5036                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5037                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5038                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5039                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5040                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5041                 </fields>
5042                 <links>
5043                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5044                 </links>
5045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5046                         <actions>
5047                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5048                                         <context link="distribution" field="holding_lib" />
5049                                 </create>
5050                                 <retrieve/>
5051                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5052                                         <context link="distribution" field="holding_lib" />
5053                                 </update>
5054                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5055                                         <context link="distribution" field="holding_lib" />
5056                                 </delete>
5057                         </actions>
5058                 </permacrud>
5059         </class>
5060
5061         <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">
5062                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5063                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5064                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5065                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5066                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5067                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5068                 </fields>
5069                 <links>
5070                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5071                 </links>
5072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5073                         <actions>
5074                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5075                                         <context link="distribution" field="holding_lib" />
5076                                 </create>
5077                                 <retrieve/>
5078                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5079                                         <context link="distribution" field="holding_lib" />
5080                                 </update>
5081                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5082                                         <context link="distribution" field="holding_lib" />
5083                                 </delete>
5084                         </actions>
5085                 </permacrud>
5086         </class>
5087
5088         <class id="ascecm" controller="open-ils.cstore" 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">
5089                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5090                         <field name="id" reporter:datatype="id" />
5091                         <field name="owning_copy" reporter:datatype="link"/>
5092                         <field name="stat_cat" reporter:datatype="link"/>
5093                         <field name="stat_cat_entry" reporter:datatype="link"/>
5094                 </fields>
5095                 <links>
5096                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5097                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5098                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5099                 </links>
5100         </class>
5101         <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">
5102                 <fields oils_persist:primary="code">
5103                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5104                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5105                 </fields>
5106                 <links/>
5107         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5108             <actions>
5109                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5110                 <retrieve/>
5111                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5112                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5113             </actions>
5114         </permacrud>
5115         </class>
5116         <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">
5117                 <fields oils_persist:primary="code">
5118                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5119                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5120                 </fields>
5121                 <links/>
5122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123             <actions>
5124                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5125                 <retrieve/>
5126                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5127                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5128             </actions>
5129         </permacrud>
5130         </class>
5131         <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">
5132                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5133                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5134                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5135                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5136                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5137                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5138                 </fields>
5139                 <links>
5140             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5141         </links>
5142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5143             <actions>
5144                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5145                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5146                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5147                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5148             </actions>
5149         </permacrud>
5150         </class>
5151         <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">
5152                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5153                         <field name="id" reporter:datatype="id" />
5154                         <field name="name" reporter:datatype="text"/>
5155                 </fields>
5156                 <links/>
5157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5158             <actions>
5159                 <create permission="CREATE_LASSO" global_required="true"/>
5160                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5161                 <update permission="UPDATE_LASSO" global_required="true"/>
5162                 <delete permission="DELETE_LASSO" global_required="true"/>
5163             </actions>
5164         </permacrud>
5165         </class>
5166         <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">
5167                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5168                         <field name="id" reporter:datatype="id" />
5169                         <field name="lasso" reporter:datatype="link"/>
5170                         <field name="org_unit" reporter:datatype="org_unit"/>
5171                 </fields>
5172                 <links>
5173                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5174                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5175                 </links>
5176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5177             <actions>
5178                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5179                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5180                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5181                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5182             </actions>
5183         </permacrud>
5184         </class>
5185         <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">
5186                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5187                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5188                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5189                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5190                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5191                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5192                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5193                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5194                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5195                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5196                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5197                 </fields>
5198                 <links>
5199                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5200                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5201                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5202                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5203                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5204                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5205                 </links>
5206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207             <actions>
5208                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5209                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5210                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5211                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5212             </actions>
5213         </permacrud>
5214         </class>
5215         <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">
5216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5217                         <field name="id" reporter:datatype="id" />
5218                         <field name="from_org" reporter:datatype="org_unit"/>
5219                         <field name="to_org" reporter:datatype="org_unit"/>
5220                         <field name="prox" reporter:datatype="int" />
5221                 </fields>
5222                 <links>
5223                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5224                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5225                 </links>
5226         </class>
5227         <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">
5228                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5229                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5230                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5231                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5232                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5233                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5234                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5235                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5236                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5237                 </fields>
5238                 <links/>
5239         </class>
5240         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5242                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5243                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5244                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5245                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5246                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5247                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5248                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5249                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5250                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5251                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5252                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5253                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5254                 </fields>
5255                 <links>
5256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5257                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5258                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5259                 </links>
5260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5261             <actions>
5262                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5263                 <retrieve/>
5264                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5265                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5266             </actions>
5267         </permacrud>
5268         </class>
5269         <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">
5270                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5271                         <field name="address_type"  reporter:datatype="text"/>
5272                         <field name="city"  reporter:datatype="text"/>
5273                         <field name="country"  reporter:datatype="text"/>
5274                         <field name="county"  reporter:datatype="text"/>
5275                         <field name="id" reporter:datatype="id" />
5276                         <field name="org_unit" reporter:datatype="org_unit"/>
5277                         <field name="post_code"  reporter:datatype="text"/>
5278                         <field name="state"  reporter:datatype="text"/>
5279                         <field name="street1"  reporter:datatype="text"/>
5280                         <field name="street2"  reporter:datatype="text"/>
5281                         <field name="valid" reporter:datatype="bool"/>
5282                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5283                 </fields>
5284                 <links>
5285                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5286                 </links>
5287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5288             <actions>
5289                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5290                 <retrieve/>
5291                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5292                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5293             </actions>
5294         </permacrud>
5295         </class>
5296         <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">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5298                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5299                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5300                         <field name="query_text" reporter:datatype="text"/>
5301                 </fields>
5302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5303             <actions>
5304                 <retrieve/>
5305             </actions>
5306         </permacrud>
5307         </class>
5308
5309         <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">
5310                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5311                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5312                         <field name="owner" reporter:datatype="org_unit"/>
5313                         <field name="code" reporter:datatype="text"/>
5314                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5315                         <field name="create_date" reporter:datatype="timestamp"/>
5316                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5317                 </fields>
5318                 <links>
5319                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5320                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5321                 </links>
5322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5323             <actions>
5324                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5325                 <retrieve/>
5326                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5327                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5328             </actions>
5329         </permacrud>
5330         </class>
5331         <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">
5332                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5333                         <field name="id" reporter:datatype="id"/>
5334                         <field name="grp" reporter:datatype="link"/>
5335                         <field name="pos" reporter:datatype="int"/>
5336                         <field name="query" reporter:datatype="link"/>
5337                 </fields>
5338                 <links>
5339                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5340                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5341                 </links>
5342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5343             <actions>
5344                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5345                     <context link="grp" field="owner"/>
5346                 </create>
5347                 <retrieve/>
5348                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5349                     <context link="grp" field="owner"/>
5350                 </update>
5351                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5352                     <context link="grp" field="owner"/>
5353                 </delete>
5354             </actions>
5355         </permacrud>
5356         </class>
5357
5358         <!-- A note: Please update alhr and ahopl when updating ahr -->
5359         <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">
5360                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5361                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5362                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5363                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5364                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5365                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5366                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5367                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5368                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5369                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5370                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5371                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5372                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5373                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5374                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5375                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5376                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5377                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5378                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5379                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5380                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5381                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5382                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5383                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5384                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5385                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5386                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5387                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5388                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5389                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5390                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5391                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5392                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5393                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5394                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5395                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5396                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5397                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5398                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5399                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5400                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5401                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5402                 </fields>
5403                 <links>
5404                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5405                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5406                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5407                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5408                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5409                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5411                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5412                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5413                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5414                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5415                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5416                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5417                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5418                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5419                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5420                 </links>
5421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5422                         <actions>
5423                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5424                         </actions>
5425                 </permacrud>
5426         </class>
5427         <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">
5428                 <oils_persist:source_definition><![CDATA[
5429                 SELECT
5430                         ahr.*,
5431                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5432                                 copy_location_order_position,
5433                         CASE WHEN au.alias IS NOT NULL THEN
5434                                 au.alias
5435                         ELSE
5436                                 au.first_given_name
5437                         END AS usr_alias_or_first_given_name,
5438                         au.first_given_name AS usr_first_given_name,
5439                         au.second_given_name AS usr_second_given_name,
5440                         au.family_name AS usr_family_name,
5441                         au.prefix AS usr_prefix,
5442                         au.suffix AS usr_suffix,
5443                         au.alias AS usr_alias,
5444                         CASE WHEN au.alias IS NOT NULL THEN
5445                                 au.alias
5446                         ELSE
5447                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5448                                         COALESCE(au.family_name, ''),
5449                                         COALESCE(au.suffix, ''),
5450                                         ', ',
5451                                         COALESCE(au.prefix, ''),
5452                                         COALESCE(au.first_given_name, ''),
5453                                         COALESCE(au.second_given_name, '')
5454                                 ], ' '), E'\\s+,', ',')
5455                         END AS usr_alias_or_display_name,
5456                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5457                                 COALESCE(au.family_name, ''),
5458                                 COALESCE(au.suffix, ''),
5459                                 ', ',
5460                                 COALESCE(au.prefix, ''),
5461                                 COALESCE(au.first_given_name, ''),
5462                                 COALESCE(au.second_given_name, '')
5463                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5464                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5465                                 AS call_number_label,
5466                         siss.label AS issuance_label,
5467                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5468                         ahcm_1.copy_count AS potential_copies
5469                 FROM action.hold_request ahr
5470                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5471                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5472                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5473                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5474                 JOIN actor.usr au ON (au.id = ahr.usr)
5475                 JOIN (
5476                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5477                         FROM asset.copy_location
5478                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5479                 LEFT JOIN actor.usr_standing_penalty ausp 
5480                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5481                 LEFT JOIN config.standing_penalty csp
5482                         ON (
5483                                 csp.id = ausp.standing_penalty AND 
5484                                 csp.block_list LIKE '%CAPTURE%' AND (
5485                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5486                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5487                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5488                                         )
5489                                 )
5490                         )
5491                 JOIN (
5492                         SELECT COUNT(target_copy) AS copy_count, hold
5493                         FROM action.hold_copy_map
5494                         GROUP BY 2
5495                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5496                 LEFT JOIN serial.issuance siss
5497                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5498                 LEFT JOIN asset.copy_location_order acplo
5499                         ON (acp.location = acplo.location AND
5500                                 acp.circ_lib = acplo.org)
5501                 WHERE
5502                         ahr.capture_time IS NULL AND
5503                         ahr.cancel_time IS NULL AND
5504                         csp.id IS NULL AND
5505                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5506                         acp.status IN (0,7)
5507                 ]]></oils_persist:source_definition>
5508                 <fields oils_persist:primary="id">
5509                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5510                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5511                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5512                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5513                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5514                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5515                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5516                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5517                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5518                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5519                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5520                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5521                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5522                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5523                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5524                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5525                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5526                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5527                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5528                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5529                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5530                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5531                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5532                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5533                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5534                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5535                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5536                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5537                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5538                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5540                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5543                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5544                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5545                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5546                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5547                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5548                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5549                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5550                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5551                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5552                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5553                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5554                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5555                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5556                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5557                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5558                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5559                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5560                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5561                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5562                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5563                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5564                 </fields>
5565                 <links>
5566                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5567                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5568                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5569                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5570                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5571                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5572                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5573                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5574                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5575                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5576                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5577                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5578                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5579                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5580                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5581                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5582                 </links>
5583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5584                         <actions>
5585                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5586                         </actions>
5587                 </permacrud>
5588         </class>
5589         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5590                 <oils_persist:source_definition>
5591                         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 GROUP BY current_copy)x USING (current_copy, capture_time)
5592                 </oils_persist:source_definition>
5593                 <fields oils_persist:primary="id">
5594                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5595                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5596                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5597                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5598                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5599                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5600                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5601                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5602                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5603                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5604                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5605                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5606                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5607                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5608                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5609                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5610                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5611                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5612                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5613                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5614                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5615                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5616                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5617                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5618                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5619                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5620                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5621                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5622                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5623                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5624                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5625                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5626                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5627                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5628                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5629                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5631                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5632                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5633                 </fields>
5634                 <links>
5635                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5636                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5637                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5638                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5639                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5640                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5641                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5642                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5643                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5644                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5645                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5646                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5647                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5648                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5649                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5650                 </links>
5651         </class>
5652
5653         <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">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5656                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5657                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5658                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5659                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5660                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5661                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5662                 </fields>
5663                 <links>
5664                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5665                 </links>
5666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5667                         <actions>
5668                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5669                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5670                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5671                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5672                         </actions>
5673                 </permacrud>
5674         </class>
5675         <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">
5676                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5677                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5678                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5679                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5680                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5681                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5683                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5684                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5686                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5687                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5688                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5689                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5690                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5691                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5692                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5693                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5694                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5695                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5696                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5697                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5698                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5699                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5700                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5701                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5702                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5704                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5705                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5706                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5707                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5708                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5709                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5710                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5711                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5712                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5713                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5714                 </fields>
5715                 <links>
5716                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5717                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5718                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5719                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5720                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5721                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5722                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5723                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5724                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5725                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5726                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5727                 </links>
5728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5729                         <actions>
5730                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5731                         </actions>
5732                 </permacrud>
5733         </class>
5734         <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">
5735                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5736                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5737                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5738                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5739                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5740                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5741                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5742                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5743                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5744                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5745                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5746                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5747                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5748                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5749                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5750                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5751                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5752                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5753                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5754                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5755                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5756                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5757                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5758                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5759                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5760                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5761                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5762                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5763                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5764                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5767                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5768                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5769                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5770                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5771                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5772                 </fields>
5773                 <links>
5774                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5775                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5776                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5777                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5778                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5779                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5780                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5781                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5782                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5783                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5784                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5785                 </links>
5786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5787                         <actions>
5788                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5789                         </actions>
5790                 </permacrud>
5791         </class>
5792
5793         <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">
5794                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5795                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5796                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5797                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5798                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5799                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5800                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5801                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5802                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5803                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5804                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5805                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5806                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5807                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5808                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5809                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5810                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5811                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5813                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5814                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5815                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5816                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5817                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5818                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5819                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5820                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5821                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5822                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5823                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5824                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5825                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5826                 </fields>
5827                 <links>
5828                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5829                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5830                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5831                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5832                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5833                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5834                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5835                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5836                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5837                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5838                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5839                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5840                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5841                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5842                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5843                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5844                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5845                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5846                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5847                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5848                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5849                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5850                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5851                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5852                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5853                 </links>
5854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5855             <actions>
5856                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5857                 <retrieve />
5858                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5859                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5860             </actions>
5861         </permacrud>
5862         </class>
5863         <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">
5864                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5866                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5867                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5868                 </fields>
5869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5870                         <actions>
5871                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5872                                 <retrieve/>
5873                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5874                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5875                         </actions>
5876                 </permacrud>
5877         </class>
5878         <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">
5879                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5880                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5881                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5882                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5883                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5884                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5885                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5886                 </fields>
5887                 <links>
5888                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5889                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5890                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5891                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5892                 </links>
5893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5894                         <actions>
5895                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5896                                 <retrieve/>
5897                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5898                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5899                         </actions>
5900                 </permacrud>
5901         </class>
5902         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
5903                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5904                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5905                         <field name="btype" reporter:datatype="text"/>
5906                         <field name="id" reporter:datatype="id" />
5907                         <field name="name"  reporter:datatype="text"/>
5908                         <field name="description" reporter:datatype="text"/>
5909                         <field name="owner" reporter:datatype="link"/>
5910                         <field name="pub" reporter:datatype="bool"/>
5911                         <field name="create_time" reporter:datatype="timestamp" />
5912                 </fields>
5913                 <links>
5914                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5915                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5916                 </links>
5917         </class>
5918         <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">
5919                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5920                         <field name="id" reporter:datatype="id" />
5921                         <field name="bucket" reporter:datatype="link"/>
5922                         <field name="note" reporter:datatype="text" />
5923                 </fields>
5924                 <links>
5925                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5926                 </links>
5927         </class>
5928         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5929                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5930                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5931                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5933                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5934                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5935                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5936                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5937                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5938                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5939                 </fields>
5940                 <links>
5941                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5942                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5943                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5944                 </links>
5945         </class>
5946         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5947                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5948                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5949                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5950                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5951                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5952                 </fields>
5953                 <links>
5954                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5955                 </links>
5956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5957                         <actions>
5958                                 <retrieve permission="VIEW_USER">
5959                                         <context link="usr" field="home_ou" />
5960                                 </retrieve>
5961                         </actions>
5962                 </permacrud>
5963         </class>
5964     <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">
5965         <fields oils_persist:primary="field">
5966             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5967             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5968             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5969         </fields>
5970         <links/>
5971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5972             <actions>
5973                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5974                 <retrieve />
5975                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5976                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5977             </actions>
5978         </permacrud>
5979     </class>
5980         <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">
5981                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5982                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5983                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5984                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5985                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5986                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5987                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5988                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5989                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5990                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5991                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5992                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5993                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5994                 </fields>
5995                 <links>
5996                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5997                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5998                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5999                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6000                 </links>
6001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6002             <actions>
6003                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6004                 <retrieve />
6005                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6006                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6007             </actions>
6008         </permacrud>
6009         </class>
6010         <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">
6011                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6012                         <field name="field" reporter:datatype="link"/>
6013                         <field name="id" reporter:datatype="id" />
6014                         <field name="source" reporter:datatype="link"/>
6015                         <field name="value"  reporter:datatype="text"/>
6016                 </fields>
6017                 <links>
6018                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6019                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6020                 </links>
6021         </class>
6022         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6023                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6024                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6025                         <field name="btype" reporter:datatype="text"/>
6026                         <field name="id" reporter:datatype="id" />
6027                         <field name="name"  reporter:datatype="text"/>
6028                         <field name="description" reporter:datatype="text"/>
6029                         <field name="owner" reporter:datatype="link"/>
6030                         <field name="pub" reporter:datatype="bool"/>
6031                         <field name="create_time" reporter:datatype="timestamp" />
6032                 </fields>
6033                 <links>
6034                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6035                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6036                 </links>
6037         </class>
6038         <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">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6040                         <field name="id" reporter:datatype="id" />
6041                         <field name="bucket" reporter:datatype="link"/>
6042                         <field name="note" reporter:datatype="text" />
6043                 </fields>
6044                 <links>
6045                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6046                 </links>
6047         </class>
6048         <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">
6049                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6050                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6051                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6052                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6053                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6054                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6055                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6056                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6057                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6058                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6059                 </fields>
6060                 <links>
6061                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6062                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6063                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6064                 </links>
6065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6066             <actions>
6067                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6068                     <context link="xact" jump="usr" field="home_ou"/>
6069                 </retrieve>
6070                         </actions>
6071                 </permacrud>
6072         </class>
6073         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6074                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6075                         <field name="id" reporter:datatype="id" />
6076                         <field name="ind1" />
6077                         <field name="ind2" />
6078                         <field name="record" />
6079                         <field name="subfield" />
6080                         <field name="tag" />
6081                         <field name="value" />
6082                 </fields>
6083                 <links>
6084                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6085                 </links>
6086         </class>
6087         <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">
6088                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6089                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6090                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6091                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6092                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6093                 </fields>
6094                 <links>
6095                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6096                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6097                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6098                 </links>
6099         </class>
6100         <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">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6102                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6103                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6104                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6105                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6106                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6107                 </fields>
6108                 <links>
6109                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6110                 </links>
6111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6112             <actions>
6113                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6114                 <retrieve/>
6115                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6116                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6117             </actions>
6118         </permacrud>
6119
6120         </class>
6121         <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">
6122                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6123                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6124                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6125                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6126                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6127                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6128                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6129                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6130                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6131                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6132                 </fields>
6133                 <links>
6134                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6135                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6136                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6137                 </links>
6138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6139             <actions>
6140                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6141                 <retrieve/>
6142                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6143                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6144             </actions>
6145         </permacrud>
6146         </class>
6147         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6148                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6149                         <field name="create_date" reporter:datatype="timestamp"/>
6150                         <field name="creator" reporter:datatype="link"/>
6151                         <field name="edit_date" reporter:datatype="timestamp"/>
6152                         <field name="editor" reporter:datatype="link"/>
6153                         <field name="id" reporter:datatype="id" />
6154                         <field name="pub" reporter:datatype="bool"/>
6155                         <field name="record" reporter:datatype="link"/>
6156                         <field name="value"  reporter:datatype="text"/>
6157                 </fields>
6158                 <links>
6159                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6160                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6161                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6162                 </links>
6163         </class>
6164         <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">
6165                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6166                         <field name="balance_owed" reporter:datatype="money" />
6167                         <field name="total_owed" reporter:datatype="money" />
6168                         <field name="total_paid" reporter:datatype="money" />
6169                         <field name="usr" reporter:datatype="link"/>
6170                 </fields>
6171                 <links>
6172                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6173                 </links>
6174         </class>
6175         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6176                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6177                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6178                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6179                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6180                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6181                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6182                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6183                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6184                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6185                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6186                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6187                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6188                 </fields>
6189                 <links>
6190                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6191                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6192                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6193                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6194                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6195                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6196                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6197                 </links>
6198         </class>
6199         <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">
6200                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6201                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6202                         <field name="quality" reporter:datatype="int" />
6203                         <field name="source" reporter:datatype="text"/>
6204                         <field name="transcendant" reporter:datatype="bool"/>
6205                         <field name="can_have_copies" reporter:datatype="bool"/>
6206                 </fields>
6207                 <links/>
6208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6209             <actions>
6210                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6211                 <retrieve/>
6212                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6213                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6214             </actions>
6215         </permacrud>
6216         </class>
6217         <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">
6218                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6219                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6220                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6221                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6222                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6223                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6224                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6225                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6226                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6227                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6228                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6229                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6230                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6231                 </fields>
6232                 <links>
6233                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6234                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6235                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6236                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6237                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6238                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6239                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6240                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6241                 </links>
6242                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6243                         <actions>
6244                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6245                                         <context link="usr" field="home_ou" />
6246                                 </retrieve>
6247                         </actions>
6248                 </permacrud>
6249         </class>
6250         <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">
6251                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6252                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6253                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6254                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6255                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6256                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6257                 </fields>
6258                 <links>
6259                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6260                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6261                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6262                 </links>
6263         </class>
6264         <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">
6265                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6266                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6267                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6268                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6269                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6270                 </fields>
6271                 <links>
6272                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6273                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6274                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6275                 </links>
6276         </class>
6277         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6279                         <field name="bucket" reporter:datatype="link"/>
6280                         <field name="id" reporter:datatype="id" />
6281                         <field name="target_user" reporter:datatype="link"/>
6282                         <field name="create_time" reporter:datatype="timestamp" />
6283                         <field name="pos" reporter:datatype="int" />
6284                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6285                 </fields>
6286                 <links>
6287                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6288                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6289             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6290                 </links>
6291         </class>
6292         <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">
6293                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6294                         <field name="id" reporter:datatype="id" />
6295                         <field name="item" reporter:datatype="link"/>
6296                         <field name="note" reporter:datatype="text" />
6297                 </fields>
6298                 <links>
6299                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6300                 </links>
6301         </class>
6302         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6303                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6304                         <field name="balance_owed" reporter:datatype="money" />
6305                         <field name="total_owed" reporter:datatype="money" />
6306                         <field name="total_paid" reporter:datatype="money" />
6307                         <field name="usr" reporter:datatype="link"/>
6308                 </fields>
6309                 <links>
6310                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6311                 </links>
6312         </class>
6313         <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">
6314                 <fields oils_persist:primary="code" oils_persist:sequence="">
6315                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6316                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6317                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6318                 </fields>
6319                 <links/>
6320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6321             <actions>
6322                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6323                 <retrieve/>
6324                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6325                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6326             </actions>
6327         </permacrud>
6328         </class>
6329         <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">
6330                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6331                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6332                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6333                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6334                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6335                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6336                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6337                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6338                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6339                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6340                 </fields>
6341                 <links>
6342                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6343                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6344                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6345                 </links>
6346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6347             <actions>
6348                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6349                     <context link="xact" jump="usr" field="home_ou"/>
6350                 </retrieve>
6351                         </actions>
6352                 </permacrud>
6353         </class>
6354         <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">
6355                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6356                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6357                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6358                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6359                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6360                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6361                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6362                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6363                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6364                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6365                 </fields>
6366                 <links>
6367                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6368                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6369                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6370                 </links>
6371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6372             <actions>
6373                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6374                     <context link="xact" jump="usr" field="home_ou"/>
6375                 </retrieve>
6376                         </actions>
6377                 </permacrud>
6378         </class>
6379         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="">
6381                         <field name="checkin_lib" reporter:datatype="link"/>
6382                         <field name="checkin_staff" reporter:datatype="link"/>
6383                         <field name="checkin_time" reporter:datatype="timestamp"/>
6384                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6385                         <field name="circ_staff" reporter:datatype="link"/>
6386                         <field name="desk_renewal" reporter:datatype="bool"/>
6387                         <field name="due_date" reporter:datatype="timestamp"/>
6388                         <field name="duration" reporter:datatype="interval"/>
6389                         <field name="duration_rule" reporter:datatype="link"/>
6390                         <field name="fine_interval" reporter:datatype="interval"/>
6391                         <field name="id" reporter:datatype="id" />
6392                         <field name="max_fine" reporter:datatype="money" />
6393                         <field name="max_fine_rule" reporter:datatype="link"/>
6394                         <field name="opac_renewal" reporter:datatype="bool"/>
6395                         <field name="phone_renewal" reporter:datatype="bool"/>
6396                         <field name="recurring_fine" reporter:datatype="money" />
6397                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6398                         <field name="renewal_remaining" reporter:datatype="int" />
6399             <field name="grace_period" reporter:datatype="interval" />
6400                         <field name="stop_fines" reporter:datatype="text"/>
6401                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6402                         <field name="target_copy" reporter:datatype="link"/>
6403                         <field name="usr" reporter:datatype="link"/>
6404                         <field name="xact_finish" reporter:datatype="timestamp" />
6405                         <field name="xact_start" reporter:datatype="timestamp" />
6406                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6407                 </fields>
6408                 <links>
6409                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6410                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6411                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6412                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6413                 </links>
6414         </class>
6415         <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">
6416                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6417                         <field name="field" reporter:datatype="link"/>
6418                         <field name="id" reporter:datatype="id" />
6419                         <field name="source" reporter:datatype="link"/>
6420                         <field name="value" reporter:datatype="text"/>
6421                 </fields>
6422                 <links>
6423                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6424                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6425                 </links>
6426         </class>
6427         <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">
6428                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6429                         <field name="high" reporter:datatype="money" />
6430                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6431                         <field name="low" reporter:datatype="money" />
6432                         <field name="name" reporter:datatype="text"/>
6433                         <field name="normal" reporter:datatype="money" />
6434                         <field name="recurrence_interval" reporter:datatype="interval"/>
6435             <field name="grace_period" reporter:datatype="interval" />
6436                 </fields>
6437                 <links/>
6438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6439             <actions>
6440                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6441                 <retrieve/>
6442                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6443                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6444             </actions>
6445         </permacrud>
6446         </class>
6447         <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">
6448                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6449                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6450                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6451                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6452                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6453                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6454                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6455                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6456                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6457                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6458                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6459                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6460                 </fields>
6461                 <links>
6462                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6463                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6464                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6465                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6466                 </links>
6467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6468             <actions>
6469                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6470                     <context link="xact" jump="usr" field="home_ou"/>
6471                 </retrieve>
6472                         </actions>
6473                 </permacrud>
6474         </class>
6475         <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">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6477                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6478                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6479                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6480                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6481                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6482                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6483                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6484                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6485                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6486                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6487                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6488                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6489                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6490                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6491                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6492                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6493                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6494                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6495                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6496                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6497                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6498                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6499                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6500                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6501                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6502                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6503                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6504                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6505                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6506                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6507                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6508                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6509                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6510                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6511                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6512                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6513                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6514                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6515                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6516                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6517                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6518                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6519                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6521                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6522                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6523                 </fields>
6524                 <links>
6525                         <link field="age_protect" reltype="might_have" key="id" map="" class="crahp"/>
6526                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6527                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6528                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6529                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6530                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6531                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6532                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6533                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6534                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6535                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6536                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6537                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6538                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6539                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6540                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6541                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6542                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6543                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6544                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6545                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6546                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6547                 </links>
6548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6549             <actions>
6550                 <create permission="CREATE_COPY">
6551                     <context link="call_number" field="owning_lib"/>
6552                 </create>
6553                 <retrieve/>
6554                 <update permission="UPDATE_COPY">
6555                     <context link="call_number" field="owning_lib"/>
6556                 </update>
6557                 <delete permission="DELETE_COPY">
6558                     <context link="call_number" field="owning_lib"/>
6559                 </delete>
6560             </actions>
6561         </permacrud>
6562         </class>
6563
6564         <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">
6565                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6566                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6567                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6568                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6569                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6570                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6571                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6572                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6573                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6574                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6575                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6576                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6577                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6578                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6579                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6580                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6581                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6582                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6583                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6584                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6585                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6586                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6587                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6588                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6589                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6590                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6591                 </fields>
6592                 <links>
6593                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6594                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6595                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6596                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6597                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6598                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6599                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6600                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6601                 </links>
6602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6603                         <actions>
6604                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6605                                 <retrieve />
6606                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6607                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6608                         </actions>
6609                 </permacrud>
6610         </class>
6611
6612         <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">
6613                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6614                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6615                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6616                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6617                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6618                 </fields>
6619                 <links/>
6620         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6621             <actions>
6622                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6623                 <retrieve/>
6624                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6625                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6626             </actions>
6627         </permacrud>
6628         </class>
6629         <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">
6630                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6631                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6632                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6633                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6634                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6635                 </fields>
6636                 <links/>
6637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6638             <actions>
6639                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6640                 <retrieve/>
6641                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6642                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6643             </actions>
6644         </permacrud>
6645         </class>
6646         <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">
6647                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6648                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6649                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6650                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6651                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6652                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6653                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6654                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6655                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6656                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6657                 </fields>
6658                 <links>
6659                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6660                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6661                 </links>
6662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6663             <actions>
6664                 <create permission="CREATE_PERM" global_required="true"/>
6665                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6666                 <update permission="UPDATE_PERM" global_required="true"/>
6667                 <delete permission="DELETE_PERM" global_required="true"/>
6668             </actions>
6669         </permacrud>
6670         </class>
6671         <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">
6672                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6673                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6674                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6675                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6676                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6677                 </fields>
6678                 <links>
6679                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6680                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6681                 </links>
6682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6683             <actions>
6684                 <create permission="ADMIN_SURVEY">
6685                     <context link="question" jump="survey" field="owner"/>
6686                 </create>
6687                 <retrieve/>
6688                 <update permission="ADMIN_SURVEY">
6689                     <context link="question" jump="survey" field="owner"/>
6690                 </update>
6691                 <delete permission="ADMIN_SURVEY">
6692                     <context link="question" jump="survey" field="owner"/>
6693                 </delete>
6694             </actions>
6695         </permacrud>
6696         </class>
6697         <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">
6698                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6699                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6700                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6701                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6702                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6703                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6704                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6705                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6706                 </fields>
6707                 <links>
6708                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6709                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6710                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6711                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6712                 </links>
6713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6714                         <actions>
6715                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6716                         </actions>
6717                 </permacrud>
6718         </class>
6719         <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">
6720                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6721                         <field name="balance_owed" reporter:datatype="money" />
6722                         <field name="total_owed" reporter:datatype="money" />
6723                         <field name="total_paid" reporter:datatype="money" />
6724                         <field name="usr" reporter:datatype="link"/>
6725                 </fields>
6726                 <links>
6727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6728                 </links>
6729         </class>
6730         <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">
6731                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6732                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6733                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6734                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6735                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6736                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6737                 </fields>
6738                 <links>
6739                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6740                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6741                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6742                 </links>
6743         </class>
6744         <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">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6746                         <field name="field" reporter:datatype="link"/>
6747                         <field name="id" reporter:datatype="id" />
6748                         <field name="source" reporter:datatype="link"/>
6749                         <field name="value" reporter:datatype="text"/>
6750                 </fields>
6751                 <links>
6752                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6753                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6754                 </links>
6755         </class>
6756         <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">
6757                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6758                         <field name="field" reporter:datatype="link"/>
6759                         <field name="id" reporter:datatype="id" />
6760                         <field name="source" reporter:datatype="link"/>
6761                         <field name="value" reporter:datatype="text"/>
6762                 </fields>
6763                 <links>
6764                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6765                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6766                 </links>
6767         </class>
6768         <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">
6769                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6770                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6771                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6772                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6773                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6774                 </fields>
6775                 <links>
6776                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6777                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6778                 </links>
6779         </class>
6780         <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">
6781                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6782                         <field name="depth" reporter:datatype="int" />
6783                         <field name="grantable" reporter:datatype="bool"/>
6784                         <field name="grp" reporter:datatype="link"/>
6785                         <field name="id" reporter:datatype="id" />
6786                         <field name="perm" reporter:datatype="link"/>
6787                 </fields>
6788                 <links>
6789                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6790                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6791                 </links>
6792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6793             <actions>
6794                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6795                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6796                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6797                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6798             </actions>
6799         </permacrud>
6800         </class>
6801         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6802                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6803                         <field name="items" oils_persist:virtual="true" />
6804                         <field name="btype" reporter:datatype="text"/>
6805                         <field name="id" reporter:datatype="id" />
6806                         <field name="name" reporter:datatype="text"/>
6807                         <field name="description" reporter:datatype="text"/>
6808                         <field name="owner" reporter:datatype="link"/>
6809                         <field name="pub" reporter:datatype="bool"/>
6810                         <field name="create_time" reporter:datatype="timestamp" />
6811                 </fields>
6812                 <links>
6813                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6814                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6815                 </links>
6816         </class>
6817         <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">
6818                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6819                         <field name="id" reporter:datatype="id" />
6820                         <field name="bucket" reporter:datatype="link"/>
6821                         <field name="note" reporter:datatype="text" />
6822                 </fields>
6823                 <links>
6824                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6825                 </links>
6826         </class>
6827         <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">
6828                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6829                         <field name="id" reporter:datatype="int" />
6830                         <field name="usr" reporter:datatype="link"/>
6831                         <field name="work_ou" reporter:datatype="link"/>
6832                 </fields>
6833                 <links>
6834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6835                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6836                 </links>
6837         </class>
6838         <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">
6839                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6840                         <field name="depth" reporter:datatype="int"/>
6841                         <field name="grantable" reporter:datatype="bool"/>
6842                         <field name="id" reporter:datatype="id" />
6843                         <field name="perm" reporter:datatype="link"/>
6844                         <field name="usr" reporter:datatype="link"/>
6845                 </fields>
6846                 <links>
6847                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6848                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6849                 </links>
6850         </class>
6851         <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">
6852                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6853                         <field name="object_id" reporter:datatype="text"/>
6854                         <field name="grantable" reporter:datatype="bool"/>
6855                         <field name="id" reporter:datatype="id" />
6856                         <field name="perm" reporter:datatype="link"/>
6857                         <field name="usr" reporter:datatype="link"/>
6858                         <field name="object_type" reporter:datatype="text"/>
6859                 </fields>
6860                 <links>
6861                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6862                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6863                 </links>
6864         </class>
6865         <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">
6866                 <fields oils_persist:primary="id" oils_persist:sequence="">
6867                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6868                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6869                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6870                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6871                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6872                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6873                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6874                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6875                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6876                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6877                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6878                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6879                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6880                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6881                 </fields>
6882                 <links>
6883                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6884                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6885                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6886                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6887                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6888                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6889                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6890                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6891                 </links>
6892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6893             <actions>
6894                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6895                     <context link="xact" jump="usr" field="home_ou"/>
6896                 </retrieve>
6897                         </actions>
6898                 </permacrud>
6899         </class>
6900         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
6901                 <fields oils_persist:primary="id" oils_persist:sequence="">
6902                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6903                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6904                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6905                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6906                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6907                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6908                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6909                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6910                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6911                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6912                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6913                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6914                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6915                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6916                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6917                 </fields>
6918                 <links>
6919                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6920                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6921                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6922                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6923                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6924                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6925                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6926                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6927                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6928                 </links>
6929         </class>
6930         <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">
6931                 <fields oils_persist:primary="id" oils_persist:sequence="">
6932                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6933                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6934                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6935                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6936                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6937                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6938                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6939                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6940                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6941                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6942                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6943                 </fields>
6944                 <links>
6945                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6946                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6947                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6948                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6949                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6950                 </links>
6951         </class>
6952         <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">
6953                 <fields oils_persist:primary="id" oils_persist:sequence="">
6954                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6955                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6956                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6957                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6958                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6959                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6960                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6961                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6962                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6963                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6964                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6965                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6966                 </fields>
6967                 <links>
6968                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6969                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6970                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6971                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6972                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6973                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6974                 </links>
6975         </class>
6976         <class id="cbrebi" controller="open-ils.cstore" 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">
6977                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6978                         <field name="bucket" reporter:datatype="link"/>
6979                         <field name="id" reporter:datatype="id" />
6980                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6981                         <field name="create_time" reporter:datatype="timestamp" />
6982                         <field name="pos" reporter:datatype="int" />
6983                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6984                 </fields>
6985                 <links>
6986                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6987                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6988             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6989                 </links>
6990         </class>
6991         <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">
6992                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6993                         <field name="id" reporter:datatype="id" />
6994                         <field name="item" reporter:datatype="link"/>
6995                         <field name="note" reporter:datatype="text" />
6996                 </fields>
6997                 <links>
6998                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6999                 </links>
7000         </class>
7001         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
7002                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7003                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7004                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7005                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7006                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7007                 </fields>
7008                 <links>
7009                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7010                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7011                 </links>
7012         </class>
7013     <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">
7014         <fields oils_persist:primary="field">
7015             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7016             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7017             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7018         </fields>
7019         <links/>
7020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7021             <actions>
7022                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7023                 <retrieve />
7024                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7025                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7026             </actions>
7027         </permacrud>
7028     </class>
7029         <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">
7030                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7031                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7032                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7033                 </fields>
7034                 <links/>
7035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7036             <actions>
7037                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7038                 <retrieve/>
7039                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7040                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7041             </actions>
7042         </permacrud>
7043         </class>
7044
7045
7046         <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">
7047                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7048                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7049                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7050                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7051                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7052                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7053                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7054                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7055                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7056                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7057                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7058                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7060                 </fields>
7061                 <links>
7062                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7063                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7064                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7065                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7066                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7067                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7068                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7069                 </links>
7070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7071             <actions>
7072                 <create permission="TRANSIT_COPY">
7073                     <context link="target_copy" field="owner"/>
7074                 </create>
7075                 <retrieve/>
7076                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7077                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7078             </actions>
7079         </permacrud>
7080         </class>
7081         <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">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7083                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7084                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7085                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7086                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7087                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7088                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7089                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7090                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7091                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7092                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7093                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7094                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7095                 </fields>
7096                 <links>
7097                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7098                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7099                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7100                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7101                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7102                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7103                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7104                 </links>
7105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7106             <actions>
7107                 <create permission="TRANSIT_COPY" context_field="owner">
7108                     <context link="target_copy" field="circ_lib"/>
7109                 </create>
7110                 <retrieve/>
7111                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7112                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7113             </actions>
7114         </permacrud>
7115         </class>
7116         <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">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7118                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7119                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7120                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7121                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7122                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7123                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7124                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7125                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7126                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7127                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7128                 </fields>
7129                 <links>
7130                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7131                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7132                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7133                 </links>
7134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7135             <actions>
7136                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7137                     <context link="xact" jump="usr" field="home_ou"/>
7138                 </retrieve>
7139                         </actions>
7140                 </permacrud>
7141         </class>
7142         <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">
7143                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7144                         <field name="grp" />
7145                         <field name="id" reporter:datatype="id" />
7146                         <field name="usr" />
7147                 </fields>
7148                 <links>
7149                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7150                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7151                 </links>
7152         </class>
7153         <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">
7154                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7155                         <field name="id" reporter:datatype="id" />
7156                         <field name="fq_field" reporter:datatype="text"/>
7157                         <field name="identity_value" reporter:datatype="text"/>
7158                         <field name="translation" reporter:datatype="text"/>
7159                         <field name="string" reporter:datatype="text"/>
7160                 </fields>
7161                 <links>
7162                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7163                 </links>
7164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7165             <actions>
7166                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7167                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7168                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7169                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7170             </actions>
7171         </permacrud>
7172         </class>
7173         <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">
7174                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7175                         <field name="id" reporter:datatype="id" />
7176                         <field name="fm_class" reporter:datatype="text"/>
7177                         <field name="field" reporter:datatype="text"/>
7178                         <field name="owner" reporter:datatype="org_unit"/>
7179                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7180                 </fields>
7181                 <links>
7182                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7183                 </links>
7184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7185             <actions>
7186                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7187                 <retrieve/>
7188                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7189                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7190             </actions>
7191         </permacrud>
7192         </class>
7193         <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">
7194                 <fields oils_persist:primary="code">
7195                         <field name="code" reporter:datatype="id" />
7196                         <field name="marc_code" reporter:datatype="text"/>
7197                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7198                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7199                 </fields>
7200                 <links/>
7201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7202             <actions>
7203                 <create permission="CREATE_LOCALE" global_required="true"/>
7204                 <retrieve/>
7205                 <update permission="UPDATE_LOCALE" global_required="true"/>
7206                 <delete permission="DELETE_LOCALE" global_required="true"/>
7207             </actions>
7208         </permacrud>
7209         </class>
7210         <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">
7211                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7212                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7213                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7214                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7215             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7216                 </fields>
7217                 <links>
7218                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7219                 </links>
7220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7221             <actions>
7222                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7223                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7224                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7225                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7226             </actions>
7227         </permacrud>
7228         </class>
7229
7230         <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">
7231                 <fields oils_persist:primary="id">
7232                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7233                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7234                 </fields>
7235                 <links/>
7236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7237             <actions>
7238                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7239                 <retrieve/>
7240                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7241                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7242             </actions>
7243         </permacrud>
7244         </class>
7245
7246         <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">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7249                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7250                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7251                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7252                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7253                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7254                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7255                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7256                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7257                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7258                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7259                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7260                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7261                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7262                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7263                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7264                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7265                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7266                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7267                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7268                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7269                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7270                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7271                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7272                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7273                 </fields>
7274                 <links>
7275                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7276                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7277                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7278                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7279                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7280                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7281                 </links>
7282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7283             <actions>
7284                 <create permission="user_request.create">
7285                     <context link="usr" field="home_ou"/>
7286                                 </create>
7287                 <retrieve permission="user_request.view">
7288                     <context link="usr" field="home_ou"/>
7289                                 </retrieve>
7290                 <update permission="user_request.update">
7291                     <context link="usr" field="home_ou"/>
7292                                 </update>
7293                 <delete permission="user_request.delete">
7294                     <context link="usr" field="home_ou"/>
7295                                 </delete>
7296             </actions>
7297         </permacrud>
7298         </class>
7299
7300         <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">
7301                 <fields oils_persist:primary="code">
7302                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7303                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7304                 </fields>
7305                 <links/>
7306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7307             <actions>
7308                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7309                 <retrieve/>
7310                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7311                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7312             </actions>
7313         </permacrud>
7314         </class>
7315
7316         <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">
7317                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7318                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7319                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7320                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7321                         <field reporter:label="Ratio" name="ratio" />
7322                 </fields>
7323                 <links>
7324                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7325                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7326                 </links>
7327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7328                         <actions>
7329                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7330                                 <retrieve/>
7331                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7332                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7333                         </actions>
7334                 </permacrud>
7335         </class>
7336
7337         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7338                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7339                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7340                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7341                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7342                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7343                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7344                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7345                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7346                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7347                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7348                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7349                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7350                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7351                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7352                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7353                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7354                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7355                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7356                 </fields>
7357                 <links>
7358                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7359                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7360             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7361             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7362             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7363                 </links>
7364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7365             <actions>
7366                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7367                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7368                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7369                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7370             </actions>
7371         </permacrud>
7372         </class>
7373
7374         <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">
7375                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7376                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7377                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7378                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7379                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7380                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7381                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7382                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7383                 </fields>
7384                 <links>
7385                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7386                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7387                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7388                 </links>
7389         </class>
7390
7391         <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">
7392                 <fields oils_persist:primary="code">
7393                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7394                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7395                 </fields>
7396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7397             <actions>
7398                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7399                 <retrieve/>
7400                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7401                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7402             </actions>
7403                 </permacrud>
7404         </class>
7405
7406         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7408                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7409                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7410                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7411                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7412                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7413                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7414                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7415                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7416                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7417                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7418                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7419                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7420                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7421                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7422                 </fields>
7423                 <links>
7424                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7425                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7426                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7427                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7428                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7429                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7430                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7431                 </links>
7432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7433             <actions>
7434                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7435                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7436                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7437                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7438             </actions>
7439         </permacrud>
7440         </class>
7441
7442         <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">
7443                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7445                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7446                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7447                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7448                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7449                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7450                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7451                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7452                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7453                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7454                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7455                 </fields>
7456                 <links>
7457                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7458                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7459                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7460                 </links>
7461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7462             <actions>
7463                 <create   permission="ADMIN_INVOICE">
7464                                         <context link="invoice" field="receiver"/>
7465                                 </create>
7466                 <retrieve permission="ADMIN_INVOICE">
7467                                         <context link="invoice" field="receiver"/>
7468                                 </retrieve>
7469                 <update   permission="ADMIN_INVOICE">
7470                                         <context link="invoice" field="receiver"/>
7471                                 </update>
7472                                 <delete   permission="ADMIN_INVOICE">
7473                                         <context link="invoice" field="receiver"/>
7474                                 </delete>
7475             </actions>
7476         </permacrud>
7477         </class>
7478
7479         <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">
7480                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7481                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7482                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7483                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7484                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7485                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7486                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7487                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7488                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7489                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7490                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7491                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7492                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7493                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7494                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7495                 </fields>
7496                 <links>
7497                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7498                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7499                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7500                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7501                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7502                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7503                 </links>
7504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7505             <actions>
7506                 <create   permission="ADMIN_INVOICE">
7507                                         <context link="invoice" field="receiver"/>
7508                                 </create>
7509                 <retrieve permission="ADMIN_INVOICE">
7510                                         <context link="invoice" field="receiver"/>
7511                                 </retrieve>
7512                 <update   permission="ADMIN_INVOICE">
7513                                         <context link="invoice" field="receiver"/>
7514                                 </update>
7515                                 <delete   permission="ADMIN_INVOICE">
7516                                         <context link="invoice" field="receiver"/>
7517                                 </delete>
7518             </actions>
7519         </permacrud>
7520         </class>
7521
7522         <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">
7523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7524                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7525                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7526                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7527                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7528                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7529                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7530                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7531                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7532                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7533                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7534                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7535                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7536                 </fields>
7537                 <links>
7538                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7539                 </links>
7540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7541             <actions>
7542                 <create permission="ADMIN_PROVIDER">
7543                     <context link="provider" field="owner"/>
7544                 </create>
7545                 <retrieve permission="ADMIN_PROVIDER">
7546                     <context link="provider" field="owner"/>
7547                 </retrieve>
7548                 <update permission="ADMIN_PROVIDER">
7549                     <context link="provider" field="owner"/>
7550                 </update>
7551                 <delete permission="ADMIN_PROVIDER">
7552                     <context link="provider" field="owner"/>
7553                 </delete>
7554             </actions>
7555         </permacrud>
7556         </class>
7557
7558         <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">
7559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7561                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7562                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7563                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7564                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7565                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7566         </fields>
7567                 <links>
7568                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7569                 </links>
7570         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7571             <actions>
7572                 <create permission="ADMIN_PROVIDER">
7573                     <context link="provider" field="owner"/>
7574                 </create>
7575                 <retrieve permission="ADMIN_PROVIDER">
7576                     <context link="provider" field="owner"/>
7577                 </retrieve>
7578                 <update permission="ADMIN_PROVIDER">
7579                     <context link="provider" field="owner"/>
7580                 </update>
7581                 <delete permission="ADMIN_PROVIDER">
7582                     <context link="provider" field="owner"/>
7583                 </delete>
7584             </actions>
7585         </permacrud>
7586     </class>
7587         <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">
7588                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7589                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7590                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7591                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7592                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7593                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7594                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7595                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7596                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7597                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7598                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7599                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7600                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7601                 </fields>
7602                 <links>
7603                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7604                 </links>
7605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7606             <actions>
7607                 <create permission="ADMIN_PROVIDER">
7608                     <context link="contact" jump='provider' field="owner"/>
7609                 </create>
7610                 <retrieve permission="ADMIN_PROVIDER">
7611                     <context link="contact" jump='provider' field="owner"/>
7612                 </retrieve>
7613                 <update permission="ADMIN_PROVIDER">
7614                     <context link="contact" jump='provider' field="owner"/>
7615                 </update>
7616                 <delete permission="ADMIN_PROVIDER">
7617                     <context link="contact" jump='provider' field="owner"/>
7618                 </delete>
7619             </actions>
7620         </permacrud>
7621         </class>
7622
7623         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7624                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7625                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7626                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7627                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7628                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7629                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7630                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7631                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7632                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7633                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7634                 </fields>
7635                 <links>
7636                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7637                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7638                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7639                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7640                 </links>
7641         </class>
7642
7643         <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">
7644                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7645                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7646                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7647                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7648                 </fields>
7649                 <links>
7650             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7651                 </links>
7652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7653                         <actions>
7654                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7655                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7656                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7657                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7658                         </actions>
7659                 </permacrud>
7660         </class>
7661
7662         <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">
7663                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7664                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7665                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7666                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7667                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7668                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7669                 </fields>
7670                 <links>
7671                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7672                 </links>
7673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7674                         <actions>
7675                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7676                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7677                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7678                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7679                         </actions>
7680                 </permacrud>
7681         </class>
7682
7683         <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">
7684                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7685                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7686                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7687                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7688                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7689                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7690                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7691                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7692                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7693                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7694                 </fields>
7695                 <links>
7696                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7697                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7698             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7699             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7700                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7701                 </links>
7702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7703             <actions>
7704                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7705                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7706                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7707                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7708             </actions>
7709         </permacrud>
7710         </class>
7711
7712         <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">
7713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7714                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7715                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7716                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7717                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7718                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7719                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7720                 </fields>
7721                 <links>
7722                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7723                 </links>
7724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7725                         <actions>
7726                                 <create permission="ADMIN_FUNDING_SOURCE">
7727                     <context link="funding_source" field="owner"/>
7728                 </create>
7729                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7730                     <context link="funding_source" field="owner"/>
7731                 </retrieve>
7732                                 <update permission="ADMIN_FUNDING_SOURCE">
7733                     <context link="funding_source" field="owner"/>
7734                 </update>
7735                                 <delete permission="ADMIN_FUNDING_SOURCE">
7736                     <context link="funding_source" field="owner"/>
7737                 </delete>
7738                         </actions>
7739                 </permacrud>
7740         </class>
7741
7742         <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">
7743                 <fields oils_persist:primary="id">
7744                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7745                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7746                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7747                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7748                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7749                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7750                 </fields>
7751                 <links>
7752                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7753                 </links>
7754         </class>
7755
7756         <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">
7757                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7758                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7759                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7760                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7761                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7762                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7763                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7764                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7765                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7766                 </fields>
7767                 <links>
7768                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7769                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7770                 </links>
7771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7772                         <actions>
7773                                 <create permission="ADMIN_ACQ_FUND">
7774                     <context link="fund" field="org"/>
7775                 </create>
7776                                 <retrieve permission="ADMIN_ACQ_FUND">
7777                     <context link="fund" field="org"/>
7778                 </retrieve>
7779                                 <update permission="ADMIN_ACQ_FUND">
7780                     <context link="fund" field="org"/>
7781                 </update>
7782                                 <delete permission="ADMIN_ACQ_FUND">
7783                     <context link="fund" field="org"/>
7784                 </delete>
7785                         </actions>
7786                 </permacrud>
7787         </class>
7788
7789         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7790                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7791                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7792                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7793                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7794                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7795                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7796                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7797                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7798                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7799                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7800                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7801                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7802                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7803                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7804                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7805                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7806                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7807                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7808                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7809                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7810                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7811                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7812                 </fields>
7813                 <links>
7814                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7815                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7816             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7817             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7818             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7819             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7820             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7821             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7822             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7823             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7824             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7825                 </links>
7826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7827             <actions>
7828                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7829                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7830                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7831                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7832             </actions>
7833         </permacrud>
7834         </class>
7835
7836         <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">
7837                 <fields oils_persist:primary="fund">
7838                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7839                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7840                 </fields>
7841                 <links>
7842                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7843                 </links>
7844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7845             <actions>
7846                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7847                                         <context link="fund" field="org" />
7848                 </retrieve>
7849             </actions>
7850         </permacrud>
7851         </class>
7852
7853         <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">
7854                 <fields oils_persist:primary="fund">
7855                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7856                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7857                 </fields>
7858                 <links>
7859                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7860                 </links>
7861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7862             <actions>
7863                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7864                                         <context link="fund" field="org" />
7865                 </retrieve>
7866             </actions>
7867         </permacrud>
7868         </class>
7869
7870         <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">
7871                 <fields oils_persist:primary="fund">
7872                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7873                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7874                 </fields>
7875                 <links>
7876                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7877                 </links>
7878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7879             <actions>
7880                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7881                                         <context link="fund" field="org" />
7882                 </retrieve>
7883             </actions>
7884         </permacrud>
7885         </class>
7886
7887         <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">
7888                 <fields oils_persist:primary="fund">
7889                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7890                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7891                 </fields>
7892                 <links>
7893                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7894                 </links>
7895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7896             <actions>
7897                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7898                                         <context link="fund" field="org" />
7899                 </retrieve>
7900             </actions>
7901         </permacrud>
7902         </class>
7903
7904         <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">
7905                 <fields oils_persist:primary="fund">
7906                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7907                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7908                 </fields>
7909                 <links>
7910                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7911                 </links>
7912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913             <actions>
7914                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7915                                         <context link="fund" field="org" />
7916                 </retrieve>
7917             </actions>
7918         </permacrud>
7919         </class>
7920
7921    <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">
7922         <fields oils_persist:primary="fund">
7923             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7924             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7925         </fields>
7926         <links>
7927             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7928         </links>
7929     </class>
7930
7931    <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">
7932         <fields oils_persist:primary="fund">
7933             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7934             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7935         </fields>
7936         <links>
7937             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7938         </links>
7939     </class>
7940
7941    <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">
7942         <fields oils_persist:primary="fund">
7943             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7944             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7945         </fields>
7946         <links>
7947             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7948         </links>
7949     </class>
7950
7951    <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">
7952         <fields oils_persist:primary="fund">
7953             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7954             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7955         </fields>
7956         <links>
7957             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7958         </links>
7959     </class>
7960
7961    <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">
7962         <fields oils_persist:primary="fund">
7963             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7964             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7965         </fields>
7966         <links>
7967             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7968         </links>
7969     </class>
7970
7971         <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">
7972                 <fields oils_persist:primary="funding_source">
7973                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7974                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7975                 </fields>
7976                 <links>
7977                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7978                 </links>
7979         </class>
7980
7981         <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">
7982                 <fields oils_persist:primary="funding_source">
7983                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7984                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7985                 </fields>
7986                 <links>
7987                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7988                 </links>
7989         </class>
7990
7991         <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">
7992                 <fields oils_persist:primary="funding_source">
7993                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7994                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7995                 </fields>
7996                 <links>
7997                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7998                 </links>
7999         </class>
8000
8001         <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">
8002                 <fields oils_persist:primary="fund">
8003                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8004                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8005                 </fields>
8006                 <links>
8007                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8008                 </links>
8009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8010             <actions>
8011                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8012                                         <context link="fund" field="org" />
8013                 </retrieve>
8014             </actions>
8015         </permacrud>
8016     </class>
8017     <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">
8018         <oils_persist:source_definition><![CDATA[
8019             SELECT
8020                 acqf.*,
8021                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8022                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8023                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8024                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8025             FROM
8026                 acq.fund acqf
8027                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8028                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8029                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8030                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8031         ]]></oils_persist:source_definition>
8032         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8033             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8034             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8035             <field reporter:label="Name" name="name" reporter:datatype="text" />
8036             <field reporter:label="Year" name="year" reporter:datatype="int" />
8037             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8038             <field reporter:label="Code" name="code" reporter:datatype="text" />
8039             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8040             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8041             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8042             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8043             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8044
8045             <!-- non fund-native fields -->
8046             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8047             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8048             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8049             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8050         </fields>
8051         <links>
8052             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8053             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8054             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8055         </links>
8056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8057             <actions>
8058                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8059             </actions>
8060         </permacrud>
8061         </class>
8062         <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">
8063                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8064                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8065                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8066                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8067                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8068                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8069                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8070                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8071                 </fields>
8072                 <links>
8073                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8074                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8075                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8076                 </links>
8077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8078                         <actions>
8079                                 <create permission="ADMIN_ACQ_FUND">
8080                     <context link="fund" field="org"/>
8081                 </create>
8082                                 <retrieve permission="ADMIN_ACQ_FUND">
8083                     <context link="fund" field="org"/>
8084                 </retrieve>
8085                                 <update permission="ADMIN_ACQ_FUND">
8086                     <context link="fund" field="org"/>
8087                 </update>
8088                                 <delete permission="ADMIN_ACQ_FUND">
8089                     <context link="fund" field="org"/>
8090                 </delete>
8091                         </actions>
8092                 </permacrud>
8093         </class>
8094
8095     <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">
8096         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8097             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8098             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8099             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8100             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8101             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8102             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8103             <field reporter:label="Note" name="note" reporter:datatype="text" />
8104             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8105         </fields>
8106         <links>
8107             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8108             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8109             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8110         </links>
8111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8112                         <actions>
8113                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8114                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8115                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8116                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8117                         </actions>
8118                 </permacrud>
8119     </class>
8120
8121         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8123                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8124                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8125                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8126                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8127                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8128                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8129                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8130                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8131                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8132                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8133                 </fields>
8134                 <links>
8135                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8136                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8137                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8138                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8139                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8140                 </links>
8141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8142                         <actions>
8143                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8144                         </actions>
8145                 </permacrud>
8146         </class>
8147
8148         <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">
8149                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8150                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8151                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8152                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8153                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8154                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8155                 </fields>
8156                 <links>
8157                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8158                 </links>
8159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8160                         <actions>
8161                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8162                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8163                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8164                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8165                         </actions>
8166                 </permacrud>
8167         </class>
8168
8169         <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">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8171                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8172                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8173                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8174                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8175                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8176                         <field reporter:label="State" name="state" reporter:datatype="text" />
8177                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8178                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8179                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8180                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8181                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8182                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8183                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8184                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8185                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8186                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8187                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8188                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8189                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8190                 </fields>
8191                 <links>
8192                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8193                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8194                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8195                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8196                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8197                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8198                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8199                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8200                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8201                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8202                 </links>
8203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8204                         <actions>
8205                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8206                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8207                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8208                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8209                         </actions>
8210                 </permacrud>
8211         </class>
8212
8213         <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">
8214                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8215                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8216                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8217                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8218                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8219                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8220                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8221                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8222                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8223                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8224                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8225                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8226                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8227                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8228                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8229                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8230                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8231                 </fields>
8232                 <links>
8233                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8234                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8235                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8236                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8237                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8238                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8239                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8240                 </links>
8241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8242             <actions>
8243                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8244             </actions>
8245                 </permacrud>
8246         </class>
8247
8248         <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">
8249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8250                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8251                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8252                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8253                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8254                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8255                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8256                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8257                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8258                 </fields>
8259                 <links>
8260                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8261                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8262                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8263                 </links>
8264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8265             <actions>
8266                 <create permission="CREATE_PURCHASE_ORDER">
8267                     <context link="purchase_order" field="ordering_agency"/>
8268                 </create>
8269                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8270                     <context link="purchase_order" field="ordering_agency"/>
8271                 </retrieve>
8272                 <update permission="CREATE_PURCHASE_ORDER">
8273                     <context link="purchase_order" field="ordering_agency"/>
8274                 </update>
8275                 <delete permission="CREATE_PURCHASE_ORDER">
8276                     <context link="purchase_order" field="ordering_agency"/>
8277                 </delete>
8278             </actions>
8279                 </permacrud>
8280         </class>
8281
8282         <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">
8283                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8284                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8285                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8286                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8287                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8288                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8289                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8290                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8291                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8292                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8293                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8294                 </fields>
8295                 <links>
8296                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8297                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8298                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8299                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8300                 </links>
8301                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8302             <actions>
8303                 <create permission="CREATE_PURCHASE_ORDER">
8304                     <context link="purchase_order" field="ordering_agency"/>
8305                 </create>
8306                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8307                     <context link="purchase_order" field="ordering_agency"/>
8308                 </retrieve>
8309                 <update permission="CREATE_PURCHASE_ORDER">
8310                     <context link="purchase_order" field="ordering_agency"/>
8311                 </update>
8312                 <delete permission="CREATE_PURCHASE_ORDER">
8313                     <context link="purchase_order" field="ordering_agency"/>
8314                 </delete>
8315             </actions>
8316                 </permacrud>
8317         </class>
8318
8319         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8320                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8321                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8322                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8323                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8324                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8325                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8326                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8327                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8328                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8329                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8330                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8331                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8332                         <field reporter:label="State" name="state" reporter:datatype="text" />
8333                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8334                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8335                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8336                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8337                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8338                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8339                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8340                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8341                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8342                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8343                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8344                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8345                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8346                 </fields>
8347                 <links>
8348                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8349                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8350                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8351                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8352                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8353                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8354                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8355                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8356                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8357                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8358                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8359                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8360                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8361                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8362                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8363                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8364                 </links>
8365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8366                         <actions>
8367                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8368                                         <context link="purchase_order" field="ordering_agency"/>
8369                                         <context link="picklist" field="org_unit"/>
8370                                 </retrieve>
8371                         </actions>
8372                 </permacrud>
8373         </class>
8374
8375         <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">
8376                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8377                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8378                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8379                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8380                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8381                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8382                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8383                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8384                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8385                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8386                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8387                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8388                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8389                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8390                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8391                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8392                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8393                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8394                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8395                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8396                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8397                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8398                 </fields>
8399                 <links>
8400                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8401                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8402                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8403                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8404                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8405                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8406                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8407                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8408                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8409                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8410                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8411                 </links>
8412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8413                         <actions>
8414                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8415                                         <context link="purchase_order" field="ordering_agency"/>
8416                                         <context link="picklist" field="org_unit"/>
8417                                 </retrieve>
8418                         </actions>
8419                 </permacrud>
8420         </class>
8421
8422         <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">
8423                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8424                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8425                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8426                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8427                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8428                 </fields>
8429                 <links>
8430                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8431                 </links>
8432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8433                         <actions>
8434                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8435                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8436                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8437                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8438                         </actions>
8439                 </permacrud>
8440         </class>
8441
8442         <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">
8443                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8444                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8445                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8446                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8447                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8448                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8449                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8450                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8451                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8452                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8453                 </fields>
8454                 <links>
8455                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8456                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8457                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8458                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8459                 </links>
8460         </class>
8461
8462         <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">
8463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8464                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8465                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8466                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8467                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8468                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8469                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8470                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8471                 </fields>
8472                 <links>
8473                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8474                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8475                 </links>
8476         </class>
8477
8478         <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">
8479                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8480                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8481                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8482                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8483                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8484                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8485                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8486                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8487                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8488                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8489                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8490                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8491                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8492                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8493                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8494                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8495                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8496                 </fields>
8497                 <links>
8498                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8499                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8500                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8501                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8502                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8503                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8504                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8505                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8506                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8507                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8508                 </links>
8509         </class>
8510
8511         <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">
8512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8513                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8514                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8515                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8516                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8517                 </fields>
8518                 <links/>
8519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8520                         <actions>
8521                                 <retrieve />
8522                         </actions>
8523                 </permacrud>
8524         </class>
8525
8526         <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">
8527                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8528                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8529                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8530                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8531                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8532                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8533             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8534                 </fields>
8535                 <links/>
8536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8537             <actions>
8538                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8539                 <retrieve />
8540                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8541                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8542             </actions>
8543         </permacrud>
8544         </class>
8545
8546         <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">
8547                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8548                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8549                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8550                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8551                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8552                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8553                 </fields>
8554                 <links/>
8555         </class>
8556         <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">
8557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8558                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8559                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8560                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8561                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8562                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8563                 </fields>
8564                 <links>
8565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8566                 </links>
8567         </class>
8568
8569         <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">
8570             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8571                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8572                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8573                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8574                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8575                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8576                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8577         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8578
8579             </fields>
8580             <links>
8581                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8582             </links>
8583             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8584                 <actions>
8585                     <create permission="ADMIN_PROVIDER">
8586                         <context link="provider" field="owner"/>
8587                     </create>
8588                     <retrieve permission="ADMIN_PROVIDER">
8589                         <context link="provider" field="owner"/>
8590                     </retrieve>
8591                     <update permission="ADMIN_PROVIDER">
8592                         <context link="provider" field="owner"/>
8593                     </update>
8594                     <delete permission="ADMIN_PROVIDER">
8595                         <context link="provider" field="owner"/>
8596                     </delete>
8597                 </actions>
8598             </permacrud>
8599         </class>
8600         
8601         <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">
8602             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8603                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8604                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8605                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8606                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8607             </fields>
8608             <links>
8609                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8610             </links>
8611             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8612                 <actions>
8613                     <create permission="ADMIN_PROVIDER">
8614                         <context link="provider" field="owner"/>
8615                     </create>
8616                     <retrieve permission="ADMIN_PROVIDER">
8617                         <context link="provider" field="owner"/>
8618                     </retrieve>
8619                     <update permission="ADMIN_PROVIDER">
8620                         <context link="provider" field="owner"/>
8621                     </update>
8622                     <delete permission="ADMIN_PROVIDER">
8623                         <context link="provider" field="owner"/>
8624                     </delete>
8625                 </actions>
8626             </permacrud>
8627         </class>
8628         
8629         <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">
8630             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8631                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8632                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8633                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8634                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8635                 </fields>
8636                 <links/>
8637         </class>
8638
8639         <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">
8640                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8641                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8642                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8643                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8644                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8645                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8646                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8647                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8648                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8649                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8650                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8651                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8652                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8653                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8654                 </fields>
8655                 <links>
8656                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8657                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8658                 </links>
8659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8660             <actions>
8661                 <create permission="ADMIN_PROVIDER">
8662                     <context link="provider" field="owner"/>
8663                 </create>
8664                 <retrieve permission="ADMIN_PROVIDER">
8665                     <context link="provider" field="owner"/>
8666                 </retrieve>
8667                 <update permission="ADMIN_PROVIDER">
8668                     <context link="provider" field="owner"/>
8669                 </update>
8670                 <delete permission="ADMIN_PROVIDER">
8671                     <context link="provider" field="owner"/>
8672                 </delete>
8673             </actions>
8674         </permacrud>
8675         </class>
8676
8677         <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">
8678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8679                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8680                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8681                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8682                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8683                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8684                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8685                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8686                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8687                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8688                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8689                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8690                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8691                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8692                 </fields>
8693                 <links>
8694                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8695                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8696                 </links>
8697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8698             <actions>
8699                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8700                     <context link="account" jump="provider" field="owner"/>
8701                 </retrieve>
8702                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8703                     <context link="account" jump="provider" field="owner"/>
8704                 </update>
8705                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8706                     <context link="account" jump="provider" field="owner"/>
8707                 </delete>
8708             </actions>
8709         </permacrud>
8710         </class>
8711
8712
8713         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8714                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8715                         <field name="id" reporter:datatype="id" />
8716                         <field name="parent" reporter:datatype="link"/>
8717                         <field name="owner" reporter:datatype="link"/>
8718                         <field name="create_time" reporter:datatype="timestamp"/>
8719                         <field name="name" reporter:datatype="text"/>
8720                         <field name="shared" reporter:datatype="bool"/>
8721                         <field name="share_with" reporter:datatype="link"/>
8722                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8723                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8724                 </fields>
8725                 <links>
8726                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8727                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8728                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8729                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8730                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8731                 </links>
8732         </class>
8733         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8734                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8735                         <field name="id" reporter:datatype="id" />
8736                         <field name="parent" reporter:datatype="link"/>
8737                         <field name="owner" reporter:datatype="link"/>
8738                         <field name="create_time" reporter:datatype="timestamp"/>
8739                         <field name="name" reporter:datatype="text"/>
8740                         <field name="shared" reporter:datatype="bool"/>
8741                         <field name="share_with" reporter:datatype="link"/>
8742                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8743                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8744                 </fields>
8745                 <links>
8746                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8747                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8748                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8749                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8750                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8751                 </links>
8752         </class>
8753         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8754                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8755                         <field name="id" reporter:datatype="id" />
8756                         <field name="parent" reporter:datatype="link"/>
8757                         <field name="owner" reporter:datatype="link"/>
8758                         <field name="create_time" reporter:datatype="timestamp"/>
8759                         <field name="name" reporter:datatype="text"/>
8760                         <field name="shared" reporter:datatype="bool"/>
8761                         <field name="share_with" reporter:datatype="link"/>
8762                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8763                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8764                 </fields>
8765                 <links>
8766                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8767                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8768                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8769                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8770                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8771                 </links>
8772         </class>
8773         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8774                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8775                         <field name="id" reporter:datatype="id" />
8776                         <field name="owner" reporter:datatype="link"/>
8777                         <field name="create_time" reporter:datatype="timestamp"/>
8778                         <field name="name" reporter:datatype="text"/>
8779                         <field name="data" reporter:datatype="text"/>
8780                         <field name="folder" reporter:datatype="link"/>
8781                         <field name="description" reporter:datatype="text"/>
8782                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8783                 </fields>
8784                 <links>
8785                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8786                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8787                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8788                 </links>
8789         </class>
8790         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8791                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8792                         <field name="id" reporter:datatype="id" />
8793                         <field name="owner" reporter:datatype="link"/>
8794                         <field name="create_time" reporter:datatype="timestamp"/>
8795                         <field name="template" reporter:datatype="link"/>
8796                         <field name="data" reporter:datatype="text"/>
8797                         <field name="folder" reporter:datatype="link"/>
8798                         <field name="recur" reporter:datatype="bool"/>
8799                         <field name="recurrence" reporter:datatype="interval"/>
8800                         <field name="name" reporter:datatype="text"/>
8801                         <field name="description" reporter:datatype="text"/>
8802                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8803                 </fields>
8804                 <links>
8805                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8806                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8807                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8808                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8809                 </links>
8810         </class>
8811         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8812                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8813                         <field name="id" reporter:datatype="id" />
8814                         <field name="runner" reporter:datatype="link"/>
8815                         <field name="start_time" reporter:datatype="timestamp"/>
8816                         <field name="complete_time" reporter:datatype="timestamp"/>
8817                         <field name="run_time" reporter:datatype="timestamp"/>
8818                         <field name="email" reporter:datatype="text"/>
8819                         <field name="excel_format" reporter:datatype="bool"/>
8820                         <field name="csv_format" reporter:datatype="bool"/>
8821                         <field name="html_format" reporter:datatype="bool"/>
8822                         <field name="error_code" reporter:datatype="int"/>
8823                         <field name="error_text" reporter:datatype="text"/>
8824                         <field name="report" reporter:datatype="link"/>
8825                         <field name="folder" reporter:datatype="link"/>
8826                         <field name="chart_pie" reporter:datatype="bool"/>
8827                         <field name="chart_bar" reporter:datatype="bool"/>
8828                         <field name="chart_line" reporter:datatype="bool"/>
8829                 </fields>
8830                 <links>
8831                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8832                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8833                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8834                 </links>
8835         </class>
8836         <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">
8837                 <fields oils_persist:primary="id">
8838                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8839                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8840                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8841                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8842                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8843                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8844                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8845                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8846                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8847                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8848                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8849                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8850                 </fields>
8851                 <links>
8852                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8853                 </links>
8854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8855                         <actions>
8856                                 <retrieve />
8857                         </actions>
8858                 </permacrud>
8859         </class>
8860         <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">
8861                 <fields oils_persist:primary="id">
8862                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8863                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8864                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8865                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8866                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8867                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8868                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8869                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8870                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8871                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8872                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8873                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8874                 </fields>
8875                 <links>
8876                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8877                 </links>
8878         </class>
8879         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8880                 <fields oils_persist:primary="id">
8881                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8882                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8883                         <field reporter:label="Fingerprint" name="fingerprint" />
8884                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8885                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8886                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8887                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8888                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8889                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8890                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8891                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8892                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8893                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8894                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8895                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8896                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8897                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8898                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8899                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8900                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8901                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8902                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8903                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8904                 </fields>
8905                 <links>
8906                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8907                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8908                 </links>
8909         </class>
8910         <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">
8911                 <fields oils_persist:primary="id">
8912                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8913                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8914                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8915                 </fields>
8916                 <links>
8917                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8918                 </links>
8919         </class>
8920         <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">
8921                 <fields oils_persist:primary="id">
8922                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8923                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8924                 </fields>
8925                 <links>
8926                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8927                 </links>
8928         </class>
8929         <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">
8930                 <fields oils_persist:primary="id">
8931                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8932                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8933                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8934                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8935                 </fields>
8936                 <links>
8937                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8938                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8939                 </links>
8940         </class>
8941         <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">
8942                 <fields oils_persist:primary="xact">
8943                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8944                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8945                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8946                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8947                 </fields>
8948                 <links>
8949                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8950                 </links>
8951         </class>
8952         <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">
8953                 <fields oils_persist:primary="xact">
8954                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8955                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8956                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8957                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8958                 </fields>
8959                 <links>
8960                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8961                 </links>
8962         </class>
8963         <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)">
8964                 <fields oils_persist:primary="id">
8965                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8966                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8967                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8968                 </fields>
8969                 <links>
8970                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8971                 </links>
8972         </class>
8973         <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">
8974                 <fields oils_persist:primary="id">
8975                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8976                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8977                 </fields>
8978                 <links>
8979                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8980                 </links>
8981         </class>
8982         <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">
8983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8984                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8985                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8986                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8987                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8988                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8989                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8990                 </fields>
8991                 <links>
8992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8993                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8994                 </links>
8995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8996                         <actions>
8997                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8998                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8999                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9000                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9001                         </actions>
9002                 </permacrud>
9003         </class>
9004         <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">
9005                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9006                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9007                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9008                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9009                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9010                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9011                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9012                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9013                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9014                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9015                 </fields>
9016                 <links>
9017                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9018                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9019                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9020                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9021                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9022                 </links>
9023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9024                         <actions>
9025                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9026                                         <context link="formula" field="owner"/>
9027                                 </create>
9028                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9029                                         <context link="formula" field="owner"/>
9030                                 </retrieve>
9031                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9032                                         <context link="formula" field="owner"/>
9033                                 </update>
9034                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9035                                         <context link="formula" field="owner"/>
9036                                 </delete>
9037                         </actions>
9038                 </permacrud>
9039         </class>
9040
9041         <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">
9042                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9043                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9044                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9045                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9046                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9047                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9048                 </fields>
9049                 <links>
9050                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9051                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9052                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9053                 </links>
9054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9055                         <actions>
9056                                 <create permission="CREATE_PURCHASE_ORDER">
9057                                         <context link="formula" field="owner"/>
9058                 </create>
9059                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9060                                         <context link="formula" field="owner"/>
9061                 </retrieve>
9062                                 <update permission="CREATE_PURCHASE_ORDER">
9063                                         <context link="formula" field="owner"/>
9064                 </update>
9065                                 <delete permission="CREATE_PURCHASE_ORDER">
9066                                         <context link="formula" field="owner"/>
9067                 </delete>
9068                         </actions>
9069                 </permacrud>
9070         </class>
9071
9072         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9073                 <fields oils_persist:primary="id">
9074                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9075                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9076                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9077                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9078                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9079                 </fields>
9080                 <links>
9081                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9082                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9083                 </links>
9084         </class>
9085
9086         <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">
9087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9088                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9089                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9090                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9091                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9092                 </fields>
9093                 <links>
9094                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9095                 </links>
9096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9097                         <actions>
9098                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9099                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9100                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9101                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9102                         </actions>
9103                 </permacrud>
9104         </class>
9105
9106         <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">
9107                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9108                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9109                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9110                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9111                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9112                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9113                 </fields>
9114                 <links>
9115                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9116                 </links>
9117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9118                         <actions>
9119                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9120                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9121                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9122                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9123                         </actions>
9124                 </permacrud>
9125         </class>
9126
9127         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9128                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9129                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9130                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9131                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9132                 </fields>
9133                 <links>
9134                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9135                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9136                 </links>
9137         </class>
9138
9139         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9141                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9142                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9143                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9144                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9145                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9146                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9147                 </fields>
9148                 <links>
9149                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9150                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9151                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9152                 </links>
9153         </class>
9154
9155         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9157                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9158                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9159                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9160                 </fields>
9161                 <links>
9162                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9163                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9164                 </links>
9165         </class>
9166
9167         <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">
9168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9169                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9170                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9171                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9172                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9173                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9174                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9175                 </fields>
9176                 <links>
9177                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9178                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9179                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9180                 </links>
9181         </class>
9182
9183         <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">
9184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9185                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9186                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9187                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9188                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9189                 </fields>
9190                 <links>
9191                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9192                 </links>
9193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9194             <actions>
9195                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9196                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9197                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9198                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9199             </actions>
9200                 </permacrud>
9201         </class>
9202
9203         <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">
9204                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9205                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9206                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9207                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9208                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9209                 </fields>
9210                 <links>
9211                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9212                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9213                 </links>
9214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9215                         <actions>
9216                                 <create permission="ADMIN_CLAIM_POLICY">
9217                                         <context link="claim_policy" field="org_unit"/>
9218                 </create>
9219                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9220                                         <context link="claim_policy" field="org_unit"/>
9221                 </retrieve>
9222                                 <update permission="ADMIN_CLAIM_POLICY">
9223                                         <context link="claim_policy" field="org_unit"/>
9224                 </update>
9225                                 <delete permission="ADMIN_CLAIM_POLICY">
9226                                         <context link="claim_policy" field="org_unit"/>
9227                 </delete>
9228                         </actions>
9229                 </permacrud>
9230         </class>
9231
9232     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9233         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9234             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9235             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9236             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9237             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9238             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9239             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9240             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9241             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9242             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9243             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9244             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9245             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9246             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9247             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9248             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9249             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9250         </fields>
9251         <links>
9252             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9253         </links>
9254     </class>
9255
9256     <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">
9257         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9258             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9259             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9260             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9261             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9262             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9263         </fields>
9264     </class>
9265
9266     <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">
9267         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9268             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9269             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9270             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9271             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9272             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9273             <field reporter:label="City" name="city" reporter:datatype="text"/>
9274             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9275             <field reporter:label="State" name="state" reporter:datatype="text"/>
9276             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9277             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9278             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9279         </fields>
9280     </class>
9281
9282     <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">
9283         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9284             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9285             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9286             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9287             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9288             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9289             <field reporter:label="City" name="city" reporter:datatype="text"/>
9290             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9291             <field reporter:label="State" name="state" reporter:datatype="text"/>
9292             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9293             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9294             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9295         </fields>
9296     </class>
9297
9298     <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">
9299         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9300             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9301             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9302             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9303             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9304             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9305             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9306         </fields>
9307     </class>
9308
9309         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9310                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9311                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9312                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9313                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9314                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9315                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9316                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9317                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9318                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9319                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9320                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9321                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9322                 </fields>
9323                 <links>
9324                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9325                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9326                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9327                 </links>
9328         </class>
9329
9330         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9331                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9332                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9333                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9334                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9335                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9336                 </fields>
9337                 <links>
9338                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9339                 </links>
9340         </class>
9341
9342     <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">
9343         <fields>
9344             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9345             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9346             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9347         </fields>
9348                 <links>
9349                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9350                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9351                 </links>
9352     </class>
9353
9354     <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">
9355         <fields>
9356             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9357             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9358         </fields>
9359                 <links>
9360                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9361                 </links>
9362     </class>
9363
9364     <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">
9365         <fields>
9366             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9367             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9368             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9369         </fields>
9370                 <links>
9371                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9372                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9373                 </links>
9374     </class>
9375
9376     <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">
9377         <fields>
9378             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9379             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9380         </fields>
9381                 <links>
9382                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9383                 </links>
9384     </class>
9385
9386     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9387                 <oils_persist:source_definition>
9388
9389             SELECT  DISTINCT l.*
9390               FROM  action.unfulfilled_hold_loops l
9391                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9392               WHERE l.count = m.max
9393
9394                 </oils_persist:source_definition>
9395         <fields>
9396             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9397             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9398             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9399         </fields>
9400                 <links>
9401                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9402                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9403                 </links>
9404     </class>
9405
9406         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9407                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9408                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9409                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9410                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9411                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9412                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9413                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9414                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9415                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9416                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9417                 </fields>
9418                 <links>
9419                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9420                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9421                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9422                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9423                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9424                 </links>
9425         </class>
9426
9427         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9428                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9429                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9430                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9431                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9432                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9433                 </fields>
9434                 <links>
9435                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9436                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9437                 </links>
9438         </class>
9439
9440         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9441                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9442                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9443                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9444                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9445                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9446                 </fields>
9447                 <links>
9448                 </links>
9449         </class>
9450
9451         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9452                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9453                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9454                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9455                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9456                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9457                 </fields>
9458                 <links>
9459                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9460                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9461                 </links>
9462         </class>
9463         
9464         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9465                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9466                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9467                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9468                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9469                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9470                 </fields>
9471                 <links>
9472                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9473                 </links>
9474         </class>
9475         
9476         <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">
9477                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9478                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9479                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9480                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9481                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9482                 </fields>
9483                 <links>
9484                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9485                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9486                 </links>
9487         </class>
9488
9489         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9490                 <fields oils_persist:primary="name">
9491                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9492                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9493                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9494                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9495                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9496                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9497                 </fields>
9498                 <links>
9499                 </links>
9500         </class>
9501
9502         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9503                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9504                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9505                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9506                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9507                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9508                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9509                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9510                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9511                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9512                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9513                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9514                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9515                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9516                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9517                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9518                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9519                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9520                 </fields>
9521                 <links>
9522                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9523                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9524                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9525                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9526                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9527                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9528                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9529                 </links>
9530         </class>
9531
9532         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9533                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9534                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9535                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9536                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9537                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9538                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9539                 </fields>
9540                 <links>
9541                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9542                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9543                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9544                 </links>
9545         </class>
9546
9547         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9548                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9549                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9550                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9551                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9552                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9553                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9554                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9555                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9556                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9557                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9558                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9559                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9560                 </fields>
9561                 <links>
9562                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9563                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9564                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9565                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9566                 </links>
9567         </class>
9568
9569         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9571                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9572                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9573                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9574                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9575                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9576                 </fields>
9577                 <links>
9578                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9579                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9580                 </links>
9581         </class>
9582
9583         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9584                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9585                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9586                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9587                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9588                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9589                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9590                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9591                 </fields>
9592                 <links>
9593                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9594                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9595                 </links>
9596         </class>
9597
9598         <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">
9599                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9600                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9601                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9602                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9603                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9604                 </fields>
9605                 <links>
9606                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9607                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9608                 </links>
9609         </class>
9610
9611         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9612                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9613                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9614                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9615                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9616                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9617                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9618                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9619                 </fields>
9620                 <links>
9621                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9622                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9623                 </links>
9624         </class>
9625
9626         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9628                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9629                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9630                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9631                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9632                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9633                 </fields>
9634                 <links>
9635                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9636                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9637                 </links>
9638         </class>
9639
9640         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9641                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9642                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9643                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9644                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9645                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9646                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9647                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9648                 </fields>
9649                 <links>
9650                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9651                 </links>
9652         </class>
9653
9654         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9655                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9656                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9657                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9658                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9659                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9660                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9661                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9662                 </fields>
9663                 <links>
9664                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9665                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9666                 </links>
9667         </class>
9668
9669         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9670                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9671                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9672                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9673                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9674                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9675                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9676                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9677                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9678                 </fields>
9679                 <links>
9680                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9681                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9682                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9683                 </links>
9684         </class>
9685
9686         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9687                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9688                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9689                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9690                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9691                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9692                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9693                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9694                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9695                 </fields>
9696                 <links>
9697                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9698                 </links>
9699         </class>
9700
9701         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9704                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9705                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9707                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9708                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9709                 </fields>
9710                 <links>
9711                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9712                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9713                 </links>
9714         </class>
9715
9716         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9717                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9718                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9719                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9720                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9721                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9722                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9723                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9724                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9725                 </fields>
9726                 <links>
9727                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9728                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9729                 </links>
9730         </class>
9731
9732         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9733                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9734                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9735                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9736                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9737                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9738                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9739                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9740                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9741                 </fields>
9742                 <links>
9743                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9744                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9745                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9746                 </links>
9747         </class>
9748
9749         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9750                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9751                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9752                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9753                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9754                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9755                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9756                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9757                 </fields>
9758                 <links>
9759                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9760                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9761                 </links>
9762         </class>
9763
9764         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9765                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9766                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9767                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9768                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9769                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9770                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9771                 </fields>
9772                 <links>
9773                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9774                 </links>
9775         </class>
9776
9777         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9778                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9779                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9780                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9781                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9782                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9783                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9784                 </fields>
9785                 <links>
9786                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9787                 </links>
9788         </class>
9789
9790         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9791                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9792                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9793                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9794                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9795                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9796                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9797                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9798                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9799                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9800                 </fields>
9801                 <links>
9802                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9803                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9804                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9805                 </links>
9806         </class>
9807
9808         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9809                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9810                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9811                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9812                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9814                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9815                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9816                 </fields>
9817                 <links>
9818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9819                 </links>
9820         </class>
9821
9822         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9823                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9824                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9825                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9826                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9827                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9828                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9829                 </fields>
9830                 <links>
9831                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9832                 </links>
9833         </class>
9834
9835         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9836                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9837                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9838                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9839                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9840                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9841                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9842                 </fields>
9843                 <links>
9844                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9845                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9846                 </links>
9847         </class>
9848
9849         <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">
9850                 <fields oils_persist:primary="id">
9851                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9852                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9853                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9854                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9855                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9856                 </fields>
9857                 <links>
9858                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9859                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9860                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9861                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9862                 </links>
9863         </class>
9864
9865         <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">
9866                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9867                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9868                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9869                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9870                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9871                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9872                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9873                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9874                 </fields>
9875                 <links/>
9876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9877                         <actions>
9878                                 <retrieve/>
9879                         </actions>
9880                 </permacrud>
9881         </class>
9882
9883         <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">
9884                 <fields oils_persist:primary="ptype_key">
9885                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9886                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9887                 </fields>
9888                 <links/>
9889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9890                         <actions>
9891                                 <retrieve/>
9892                         </actions>
9893                 </permacrud>
9894         </class>
9895
9896         <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">
9897                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9899                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9900                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9901                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9902                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9903                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9904                 </fields>
9905                 <links>
9906                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9907                 </links>
9908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9909                         <actions>
9910                                 <retrieve/>
9911                         </actions>
9912                 </permacrud>
9913         </class>
9914
9915         <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">
9916                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9917                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9918                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9919                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9920                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9921                 </fields>
9922                 <links>
9923                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9924                 </links>
9925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9926                         <actions>
9927                                 <retrieve/>
9928                         </actions>
9929                 </permacrud>
9930         </class>
9931
9932     <class
9933         id="uvs"
9934         controller="open-ils.cstore open-ils.pcrud"
9935         oils_obj:fieldmapper="url_verify::session"
9936         oils_persist:tablename="url_verify.session"
9937         reporter:label="URL Verification Session"
9938     >
9939         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9940             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9941             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9942                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9943             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9944             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9945             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9946             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9947             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9948             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9949         </fields>
9950
9951         <links>
9952             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9953             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9954             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9955             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9956             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9957         </links>
9958
9959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9960             <actions>
9961                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9962             </actions>
9963         </permacrud>
9964
9965     </class>
9966
9967     <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">
9968         <oils_persist:source_definition>
9969             SELECT
9970                 cbrebi.id AS id,  -- so we can have a pkey in our view
9971                 uvs.id AS session,
9972                 uvs.owning_lib,
9973                 cbrebi.target_biblio_record_entry
9974             FROM url_verify.session uvs
9975             JOIN container.biblio_record_entry_bucket cbreb
9976                 ON (uvs.container = cbreb.id)
9977             JOIN container.biblio_record_entry_bucket_item cbrebi
9978                 ON (cbrebi.bucket = cbreb.id)
9979         </oils_persist:source_definition>
9980         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9981             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9982             <field reporter:label="Session" name="session" reporter:datatype="link" />
9983             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9984             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9985         </fields>
9986         <links>
9987             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9988             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9990         </links>
9991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9992             <actions>
9993                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9994             </actions>
9995         </permacrud>
9996     </class>
9997
9998     <class
9999         id="uvus"
10000         controller="open-ils.cstore open-ils.pcrud"
10001         oils_obj:fieldmapper="url_verify::url_selector"
10002         oils_persist:tablename="url_verify.url_selector"
10003         reporter:label="URL Verification URL Selector"
10004     >
10005         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10006             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10007             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10008                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10009             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10010         </fields>
10011
10012         <links>
10013             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10014             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10015         </links>
10016
10017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10018             <actions>
10019                 <create permission="URL_VERIFY">
10020                     <context link="session" field="owning_lib"/>
10021                 </create>
10022                 <retrieve permission="URL_VERIFY">
10023                     <context link="session" field="owning_lib"/>
10024                 </retrieve>
10025                 <update permission="URL_VERIFY">
10026                     <context link="session" field="owning_lib"/>
10027                 </update>
10028                 <delete permission="URL_VERIFY">
10029                     <context link="session" field="owning_lib"/>
10030                 </delete>
10031             </actions>
10032         </permacrud>
10033
10034     </class>
10035
10036     <class
10037         id="uvu"
10038         controller="open-ils.cstore open-ils.pcrud"
10039         oils_obj:fieldmapper="url_verify::url"
10040         oils_persist:tablename="url_verify.url"
10041         reporter:label="URL Verification URL"
10042     >
10043         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10044             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10045                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10046                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10047                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10048                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10049             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10050             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10051             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10052             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10053             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10054             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10055             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10056             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10057             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10058             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10059             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10060             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10061             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10062         </fields>
10063
10064         <links>
10065             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10066             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10067             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10068             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10069             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10070         </links>
10071
10072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10073             <actions>
10074                 <create permission="URL_VERIFY">
10075                     <context link="session" field="owning_lib"/>
10076                 </create>
10077                 <retrieve permission="URL_VERIFY">
10078                     <context link="session" field="owning_lib"/>
10079                 </retrieve>
10080                 <update permission="URL_VERIFY">
10081                     <context link="session" field="owning_lib"/>
10082                 </update>
10083                 <delete permission="URL_VERIFY">
10084                     <context link="session" field="owning_lib"/>
10085                 </delete>
10086             </actions>
10087         </permacrud>
10088
10089     </class>
10090
10091     <class
10092         id="uvva"
10093         controller="open-ils.cstore open-ils.pcrud"
10094         oils_obj:fieldmapper="url_verify::verification_attempt"
10095         oils_persist:tablename="url_verify.verification_attempt"
10096         reporter:label="URL Verification Attempt"
10097     >
10098         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10099             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10100                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10101                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10102             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10103             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10104         </fields>
10105
10106         <links>
10107             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10108             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10109         </links>
10110
10111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10112             <actions>
10113                 <create permission="URL_VERIFY">
10114                     <context link="session" field="owning_lib"/>
10115                 </create>
10116                 <retrieve permission="URL_VERIFY">
10117                     <context link="session" field="owning_lib"/>
10118                 </retrieve>
10119                 <update permission="URL_VERIFY">
10120                     <context link="session" field="owning_lib"/>
10121                 </update>
10122                 <delete permission="URL_VERIFY">
10123                     <context link="session" field="owning_lib"/>
10124                 </delete>
10125             </actions>
10126         </permacrud>
10127
10128     </class>
10129
10130     <class
10131         id="uvuv"
10132         controller="open-ils.cstore open-ils.pcrud"
10133         oils_obj:fieldmapper="url_verify::url_verification"
10134         oils_persist:tablename="url_verify.url_verification"
10135         reporter:label="URL Verification"
10136     >
10137         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10138             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10139                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10140                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10141             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10142             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10143             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10144             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10145                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10146         </fields>
10147
10148         <links>
10149             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10150             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10151             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10152         </links>
10153
10154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10155             <actions>
10156                 <create permission="URL_VERIFY">
10157                     <context link="attempt" jump="session" field="owning_lib"/>
10158                 </create>
10159                 <retrieve permission="URL_VERIFY">
10160                     <context link="attempt" jump="session" field="owning_lib"/>
10161                 </retrieve>
10162                 <update permission="URL_VERIFY">
10163                     <context link="attempt" jump="session" field="owning_lib"/>
10164                 </update>
10165                 <delete permission="URL_VERIFY">
10166                     <context link="attempt" jump="session" field="owning_lib"/>
10167                 </delete>
10168             </actions>
10169         </permacrud>
10170
10171     </class>
10172
10173         <class
10174                 id="cfdi"
10175                 controller="open-ils.cstore open-ils.pcrud"
10176                 oils_obj:fieldmapper="config::filter_dialog_interface"
10177                 oils_persist:tablename="config.filter_dialog_interface"
10178                 reporter:label="FilterDialog Interface">
10179                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10180                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10181                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10182                 </fields>
10183                 <links>
10184                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10185                 </links>
10186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10187                         <actions>
10188                                 <retrieve />
10189                         </actions>
10190                 </permacrud>
10191         </class>
10192
10193         <class
10194                 id="cfdfs"
10195                 controller="open-ils.cstore open-ils.pcrud"
10196                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10197                 oils_persist:tablename="config.filter_dialog_filter_set"
10198                 reporter:label="FilterDialog Filter Set">
10199                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10200                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10201                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10202                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10203                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10204                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10205                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10206                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10207                 </fields>
10208                 <links>
10209                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10210                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10211                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10212                 </links>
10213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10214                         <actions>
10215                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10216                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10217                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10218                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10219                         </actions>
10220                 </permacrud>
10221
10222         </class>
10223
10224         <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">
10225                 <fields oils_persist:primary="code">
10226                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10227                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10228                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10229                 </fields>
10230                 <links/>
10231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10232                         <actions>
10233                                 <retrieve/>
10234                         </actions>
10235                 </permacrud>
10236         </class>
10237
10238         <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">
10239                 <oils_persist:source_definition>
10240
10241             SELECT  b.id,
10242                     MAX(dcp.edit_date) AS last_delete_date
10243              FROM   biblio.record_entry b
10244                     JOIN asset.call_number cn ON (cn.record = b.id)
10245                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10246              WHERE  NOT b.deleted
10247              GROUP BY b.id
10248              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10249
10250                 </oils_persist:source_definition>
10251                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10252                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10253                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10254                 </fields>
10255                 <links>
10256                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10257                 </links>
10258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10259                         <actions>
10260                                 <retrieve/>
10261                         </actions>
10262                 </permacrud>
10263         </class>
10264
10265         <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">
10266                 <oils_persist:source_definition>
10267
10268             -- -- 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.
10269             -- -- 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
10270             -- -- may not.
10271             -- SELECT
10272             --     bre.id AS "bib_id",
10273             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10274             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10275             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10276             -- FROM (
10277                 SELECT
10278                     y.bre AS "id",
10279                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10280                     y.hold_count AS "hold_count",
10281                     (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"
10282                 FROM (
10283                         SELECT
10284                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10285                             COUNT(*) AS "hold_count"
10286                         FROM action.hold_request h
10287                         WHERE
10288                             cancel_time IS NULL
10289                             AND fulfillment_time IS NULL
10290                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10291                         GROUP BY 1
10292                     )y LEFT JOIN (
10293                         SELECT 
10294                             (SELECT id
10295                                 FROM biblio.record_entry 
10296                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10297                             ) AS "bre", 
10298                             COUNT(*) AS "copy_count"
10299                         FROM asset.copy
10300                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10301                         WHERE copy.holdable 
10302                             AND NOT copy.deleted 
10303                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10304                         GROUP BY 1
10305                     )x ON x.bre = y.bre
10306                 -- )z RIGHT JOIN (
10307                 --     SELECT id
10308                 --     FROM biblio.record_entry
10309                 --     WHERE NOT deleted
10310                 -- )bre ON (z.bib_id = bre.id)
10311                 
10312
10313                 </oils_persist:source_definition>
10314                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10315                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10316                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10317                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10318                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10319                 </fields>
10320                 <links>
10321                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10322                 </links>
10323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10324                         <actions>
10325                                 <retrieve/>
10326                         </actions>
10327                 </permacrud>
10328         </class>
10329
10330         <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">
10331                 <oils_persist:source_definition>
10332             SELECT *,
10333                 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,
10334                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10335             FROM
10336                 (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
10337                     FROM
10338                         action.hold_request ahr
10339                         JOIN reporter.hold_request_record rhrr USING (id)
10340                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10341                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10342                     WHERE
10343                         ahr.cancel_time IS NULL
10344                         AND ahr.fulfillment_time IS NULL
10345                     GROUP BY bib_record, pickup_lib
10346                 )x
10347                 JOIN
10348                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10349                     FROM
10350                         action.hold_request ahr
10351                         JOIN reporter.hold_request_record rhrr USING (id)
10352                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10353                     WHERE
10354                         ahr.cancel_time IS NULL
10355                         AND ahr.fulfillment_time IS NULL
10356                     GROUP BY bib_record
10357                 )y
10358                 USING (id)
10359                 </oils_persist:source_definition>
10360                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10361                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10362                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10363                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10364                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10365                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10366                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10367                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10368                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10369                 </fields>
10370                 <links>
10371                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10372                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10373                 </links>
10374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10375                         <actions>
10376                                 <retrieve/>
10377                         </actions>
10378                 </permacrud>
10379         </class>
10380
10381         <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">
10382                 <oils_persist:source_definition>
10383             SELECT
10384                 ac.id,
10385                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10386                 MAX(actac.xact_start) AS last_circ
10387             FROM asset.copy ac
10388                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10389             GROUP BY ac.id
10390
10391             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10392             --SELECT
10393             --    ac.id,
10394             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10395             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10396             --FROM asset.copy ac
10397             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10398             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10399             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10400                 </oils_persist:source_definition>
10401                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10402                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10403                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10404                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10405                 </fields>
10406                 <links>
10407                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10408                 </links>
10409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10410                         <actions>
10411                                 <retrieve/>
10412                         </actions>
10413                 </permacrud>
10414         </class>
10415
10416         <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">
10417                 <fields oils_persist:primary="id">
10418                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10419                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10420                 </fields>
10421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10422                         <actions>
10423                                 <retrieve/>
10424                         </actions>
10425                 </permacrud>
10426         </class>
10427
10428         <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">
10429                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10430                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10431                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10432                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10433                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10434                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10435                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10436                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10437                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10438                 </fields>
10439                 <links>
10440                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10441                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10442                 </links>
10443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10444                         <actions>
10445                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10446                                 <retrieve/>
10447                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10448                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10449                         </actions>
10450                 </permacrud>
10451         </class>
10452
10453         <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">
10454                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10455                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10456                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10457                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10458                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10459                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10460                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10461                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10462                 </fields>
10463                 <links>
10464                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10465                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10466                 </links>
10467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10468                         <actions>
10469                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10470                                 <retrieve/>
10471                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10472                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10473                         </actions>
10474                 </permacrud>
10475         </class>
10476
10477
10478         <!-- ********************************************************************************************************************* -->
10479         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10480         <!-- ********************************************************************************************************************* -->
10481         <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">
10482                 <fields oils_persist:primary="id">
10483                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10484                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10485                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10486                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10487                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10488                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10489                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10490                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10491                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10492                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10493                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10494                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10495                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10496                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10497                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10498                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10499                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10500                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10501                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10502                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10503                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10504                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10505                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10506                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10507                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10508                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10509                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10510                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10511                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10512                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10513                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10514                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10515                 </fields>
10516                 <links>
10517                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10518                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10519                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10520                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10521                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10522                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10523                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10524                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10525                 </links>
10526         </class>
10527
10528         <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">
10529                 <fields oils_persist:primary="id">
10530                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10531                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10532                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10533                 </fields>
10534                 <links>
10535                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10536                 </links>
10537         </class>
10538
10539         <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">
10540                 <fields oils_persist:primary="id">
10541                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10542                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10543                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10544                 </fields>
10545                 <links>
10546                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10547                 </links>
10548         </class>
10549
10550         <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">
10551                 <fields oils_persist:primary="id">
10552                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10553
10554                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10555                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10556                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10557
10558                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10559                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10560                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10561
10562                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10563                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10564
10565                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10566                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10567                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10568
10569                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10570                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10571
10572                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10573                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10574                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10575
10576                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10577                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10578                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10579
10580                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10581                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10582                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10583                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10584
10585                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10586                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10587
10588                 </fields>
10589                 <links>
10590                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10592                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10593                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10594                 </links>
10595         </class>
10596
10597         <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">
10598                 <oils_persist:source_definition>
10599
10600             SELECT
10601                 po.ordering_agency AS ordering_agency,
10602                 po.id AS purchase_order,
10603                 li.id AS lineitem,
10604                 lid.id AS lineitem_detail,
10605                 cpa.id AS claim_policy_action
10606             FROM
10607                 acq.lineitem_detail lid
10608                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10609                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10610                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10611                 JOIN acq.claim_policy_action cpa ON (
10612                     cpa.claim_policy = cp.id
10613
10614                     -- we only care about claim policy actions whose claim
10615                     -- interval we'd reached or exceeded
10616                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10617
10618                     -- filter out all claim policy actions where claim events
10619                     -- have occurred on or after the action's action_interval
10620                     AND NOT EXISTS (
10621                         SELECT 1
10622                         FROM
10623                             acq.claim_event evt
10624                             JOIN acq.claim claim ON (
10625                                 claim.id = evt.claim
10626                                 AND claim.lineitem_detail = lid.id
10627                             )
10628                         WHERE
10629                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10630                     )
10631                 )
10632             WHERE
10633                 lid.cancel_reason IS NULL
10634                 AND li.cancel_reason IS NULL -- belt/suspenders
10635                 AND po.cancel_reason IS NULL -- belt/suspenders
10636                 AND lid.recv_time IS NULL
10637                 AND po.state = 'on-order'
10638             ORDER BY 1, 2, 3, 4, 5
10639
10640                 </oils_persist:source_definition>
10641                 <fields>
10642                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10643                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10644                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10645                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10646                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10647                 </fields>
10648                 <links>
10649                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10650                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10651                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10652                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10653                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10654                 </links>
10655         </class>
10656         <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">
10657                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10658                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10659                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10660                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10661                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10662                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10663                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10664                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10665                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10666                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10667                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10668                 </fields>
10669                 <links>
10670                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10671                 </links>
10672     </class>
10673         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10674                 <oils_persist:source_definition>
10675             SELECT * FROM acq.lineitem_summary 
10676                                 WHERE item_count > (invoice_count + cancel_count)
10677         </oils_persist:source_definition>
10678                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10679                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10680                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10681                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10682                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10683                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10684                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10685                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10686                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10687                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10688                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10689                 </fields>
10690                 <links>
10691                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10692                 </links>
10693     </class>
10694         <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">
10695                 <oils_persist:source_definition>
10696
10697                         SELECT  t.*
10698                           FROM  action.transit_copy t
10699                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10700                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10701                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10702
10703                 </oils_persist:source_definition>
10704                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10705                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10706                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10707                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10708                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10709                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10710                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10711                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10712                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10713                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10714                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10715                 </fields>
10716                 <links>
10717                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10718                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10719                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10720                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10721                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10722                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10723                 </links>
10724         </class>
10725
10726     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10727                 <oils_persist:source_definition>
10728
10729         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10730                 SELECT
10731                         cp.id as copy,
10732                         COUNT(circ.id),
10733                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10734                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10735                 FROM
10736                         asset.copy cp
10737                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10738                 GROUP BY 1, 3, 4
10739                 UNION ALL
10740                 SELECT
10741                         cp.id as copy,
10742                         COUNT(circ.id),
10743                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10744                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10745                 FROM
10746                         asset.copy cp
10747                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10748                 GROUP BY 1, 3, 4
10749                 UNION ALL
10750                 SELECT
10751                         id as copy,
10752                         circ_count,
10753                         -1 AS year,
10754                         false as is_renewal
10755                 FROM
10756                         extend_reporter.legacy_circ_count
10757         )x GROUP BY 1, 3, 4
10758
10759                 </oils_persist:source_definition>
10760         <fields>
10761             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10762             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10763             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10764             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10765         </fields>
10766                 <links>
10767                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10768                 </links>
10769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10770                         <actions>
10771                                 <retrieve/>
10772                         </actions>
10773                 </permacrud>
10774     </class>
10775
10776         <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">
10777                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10778                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10779                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10780                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10781                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10782                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10783                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10784                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10785                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10786                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10787                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10788                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10789                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10790                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10791                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10792                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10793                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10794                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10795                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10796                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10797                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10798                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10799                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10800                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10801                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10802                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10803                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10804                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10805                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10806                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10807                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10808                 </fields>
10809                 <links>
10810                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10811                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10812                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10813                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10814                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10815                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10816                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10817                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10818                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10819                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10820                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10821                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10822                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10823                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10824                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10825                 </links>
10826         </class>
10827
10828     <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">
10829         <fields oils_persist:primary="id">
10830             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10831             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10832             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10833             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10834             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10835             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10836             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10837             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10838             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10839             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10840             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10841             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10842             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
10843             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
10844             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10845             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10846             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10847             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10848             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10849             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10850             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10851             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10852             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10853             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10854             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10855             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10856             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10857             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10858             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10859             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10860             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10861             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10862             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10863             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10864         </fields>
10865         <links>
10866             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10867             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10868             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10869             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10870             <link field="age_protect" reltype="might_have" key="id" map="" class="crahp"/>
10871             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10872             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
10873             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
10874         </links>
10875     </class>
10876
10877     <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">
10878         <fields oils_persist:primary="id">
10879             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10880             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10881             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10882             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10883         </fields>
10884         <links>
10885             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10886             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10887         </links>
10888     </class>
10889
10890     <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">
10891         <fields oils_persist:primary="owning_lib">
10892             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10893             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10894             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10895         </fields>
10896         <links>
10897             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10898         </links>
10899     </class>
10900
10901     <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">
10902         <fields oils_persist:primary="id">
10903             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10904             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10905             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10906             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10907             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10908         </fields>
10909         <links>
10910             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10911             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10912             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10913         </links>
10914     </class>
10915
10916     <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">
10917         <fields oils_persist:primary="circ_lib">
10918             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10919             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10920             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10921             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10922         </fields>
10923         <links>
10924             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10925             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10926         </links>
10927     </class>
10928
10929     <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">
10930         <fields oils_persist:primary="id">
10931             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10932             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10933             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10934             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10935             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10936         </fields>
10937         <links>
10938             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10939             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10940             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10941         </links>
10942     </class>
10943
10944     <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">
10945         <fields oils_persist:primary="home_ou">
10946             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10947             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10948             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10949             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10950         </fields>
10951         <links>
10952             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10953             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10954         </links>
10955     </class>
10956         <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">
10957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10958                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10959                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10960                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10961                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10962                 </fields>
10963                 <links>
10964                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10965                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10966                 </links>
10967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10968                         <actions>
10969                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10970                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10971                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10972                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10973                         </actions>
10974                 </permacrud>
10975         </class>
10976         <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">
10977                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10978                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10979                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10980                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10981                 </fields>
10982                 <links>
10983                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10984                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10985                         </links>
10986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10987                 <actions>
10988                                 <create permission="ADMIN_ACQ_FUND_TAG">
10989                                         <context link="tag" field="owner"/>
10990                                 </create>
10991                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10992                                         <context link="tag" field="owner"/>
10993                                 </retrieve>
10994                                 <update permission="ADMIN_ACQ_FUND_TAG">
10995                                         <context link="tag" field="owner"/>
10996                                 </update>
10997                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10998                                         <context link="tag" field="owner"/>
10999                                 </delete>
11000                         </actions>
11001                 </permacrud>
11002         </class>
11003         <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">
11004                 <oils_persist:source_definition><![CDATA[
11005                 SELECT
11006                         poi.purchase_order AS purchase_order,
11007                         ii.invoice AS invoice,
11008                         NULL AS lineitem,
11009                         poi.id AS po_item,
11010                         NULL AS picklist
11011                 FROM
11012                         acq.po_item poi
11013                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11014                 UNION SELECT
11015                         jub.purchase_order AS purchase_order,
11016                         ie.invoice AS invoice,
11017                         jub.id AS lineitem,
11018                         NULL AS po_item,
11019                         jub.picklist AS picklist
11020                 FROM
11021                         acq.lineitem jub
11022                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11023                 UNION SELECT
11024                         ii.purchase_order AS purchase_order,
11025                         ii.invoice AS invoice,
11026                         NULL AS lineitem,
11027                         NULL AS po_item,
11028                         NULL AS picklist
11029                 FROM
11030                         acq.invoice_item ii
11031                 WHERE ii.po_item IS NULL
11032                 UNION SELECT
11033                         ie.purchase_order AS purchase_order,
11034                         ie.invoice AS invoice,
11035                         NULL AS lineitem,
11036                         NULL AS po_item,
11037                         NULL AS picklist
11038                 FROM
11039                         acq.invoice_entry ie
11040                 WHERE ie.lineitem IS NULL
11041                 UNION SELECT
11042                         NULL AS purchase_order,
11043                         NULL AS invoice,
11044                         jub.id AS lineitem,
11045                         NULL AS po_item,
11046                         jub.picklist AS picklist
11047                 FROM
11048                         acq.lineitem jub
11049                 WHERE jub.purchase_order IS NULL
11050                 ]]></oils_persist:source_definition>
11051                 <fields>
11052                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11053                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11054                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11055                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11056                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11057                 </fields>
11058                 <links>
11059                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11060                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11061                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11062                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11063                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11064                 </links>
11065         </class>
11066         <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">
11067                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11068                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11069                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11070                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11071                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11072                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11073                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11074                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11075                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11076                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11077                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11078                 </fields>
11079                 <links>
11080                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11081                 </links>
11082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11083                         <actions>
11084                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11085                                 <retrieve/>
11086                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11087                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11088                         </actions>
11089                 </permacrud>
11090         </class>
11091
11092         <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">
11093                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11095                         <field name="date_applied" reporter:datatype="timestamp"/>
11096                         <field name="org" reporter:datatype="org_unit"/>
11097                         <field name="original_value" reporter:datatype="text"/>
11098                         <field name="new_value" reporter:datatype="text"/>
11099                         <field name="field_name" reporter:datatype="link"/>
11100                 </fields>
11101                 <links>
11102                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11103                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11104                 </links>
11105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11106                         <actions>
11107                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11108                                 <retrieve/>
11109                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11110                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11111                         </actions>
11112                 </permacrud>
11113         </class>
11114         <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">
11115                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11116                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11117                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11118                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11119                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11120                 </fields>
11121                 <links>
11122                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11123                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11124                 </links>
11125         </class>
11126         <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">
11127                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11128                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11129                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11130                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11131                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11132                 </fields>
11133                 <links>
11134                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11135                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11136                 </links>
11137         </class>
11138         <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">
11139                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11140                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11141                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11142                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11143                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11144                 </fields>
11145                 <links>
11146                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11147                 </links>
11148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11149                         <actions>
11150                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11151                                 <retrieve/>
11152                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11153                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11154                         </actions>
11155                 </permacrud>
11156         </class>
11157         <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">
11158                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11159                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11160                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11161                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11162                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11163                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11164                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11165                 </fields>
11166                 <links>
11167                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11168                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11169                 </links>
11170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11171                         <actions>
11172                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11173                                 <retrieve/>
11174                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11175                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11176                         </actions>
11177                 </permacrud>
11178         </class>
11179
11180         <!-- ********************************************************************************************************************* -->
11181
11182 </IDL>
11183
11184 <!--
11185     vim:noet:ts=4:sw=4:
11186 -->