]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1410369: add a new view to restrict arbitrary editing access
[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="Message Template" name="message_template" reporter:datatype="text"/>
1234                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1235                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1236                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1237                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1238                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1239                 </fields>
1240                 <links>
1241                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1242                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1243                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1244                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1245                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1246                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1247                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1248                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1249                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1250                 </links>
1251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1252                         <actions>
1253                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1254                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1255                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1256                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1257                         </actions>
1258                 </permacrud>
1259         </class>
1260
1261         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1262                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1263                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1264                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1265                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1266                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1267                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1268                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1269                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1270                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1271                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1272                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1273                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1274                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1275                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1276                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1277                 </fields>
1278                 <links>
1279                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1280                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1281                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1282                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1283                 </links>
1284         </class>
1285
1286         <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">
1287                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1288                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1289                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1290                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1291                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1292                 </fields>
1293                 <links>
1294                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1295                 </links>
1296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1297                         <actions>
1298                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1299                     <context link="event_def" field="owner"/>
1300                 </create>
1301                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1302                     <context link="event_def" field="owner"/>
1303                 </retrieve>
1304                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1305                     <context link="event_def" field="owner"/>
1306                 </update>
1307                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1308                     <context link="event_def" field="owner"/>
1309                 </delete>
1310                         </actions>
1311                 </permacrud>
1312         </class>
1313
1314         <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">
1315                 <oils_persist:source_definition><![CDATA[
1316                 SELECT  atevdef.hook,
1317                         atevdef.name,
1318                         atevdef.reactor,
1319                         atev.id,
1320                         atev.event_def,
1321                         atev.add_time,
1322                         atev.run_time,
1323                         atev.start_time,
1324                         atev.update_time,
1325                         atev.complete_time,
1326                         atev.update_process,
1327                         atev.state,
1328                         atev.user_data,
1329                         atev.template_output,
1330                         atev.error_output,
1331                         atev.async_output,
1332                         targ_circ.id AS target_circ,
1333                         targ_ahr.id AS target_hold,
1334                         COALESCE(
1335                                 targ_circ.circ_lib,
1336                                 targ_ahr.pickup_lib
1337                         ) AS perm_lib
1338                 FROM action_trigger.event atev
1339                 JOIN action_trigger.event_definition atevdef ON
1340                         (atevdef.id = atev.event_def)
1341                 JOIN action_trigger.hook ath ON
1342                         (ath.key = atevdef.hook)
1343                 LEFT JOIN action.circulation targ_circ ON
1344                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1345                 LEFT JOIN action.hold_request targ_ahr ON
1346                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1347                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1348                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1349                                 'circ.staff.max_visible_event_age',
1350                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1351                         ) UNION
1352                         SELECT '1000 YEARS'::INTERVAL AS value
1353                 ) ous)
1354                 ]]></oils_persist:source_definition>
1355                 <fields oils_persist:primary="id">
1356                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1357                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1358                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1359                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1360                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1361                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1362                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1363                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1364                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1365                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1366                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1367                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1368                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1369                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1370                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1371                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1372                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1373                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1374                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1375                 </fields>
1376                 <links>
1377                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1378                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1379                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1380                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1381                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1382                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1383                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1384                 </links>
1385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1386                         <actions>
1387                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1388                         </actions>
1389                 </permacrud>
1390         </class>
1391
1392         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1393                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1394                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1395                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1396                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1397                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1398                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1399                 </fields>
1400                 <links>
1401                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1402                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1403                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1404                 </links>
1405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1406                         <actions>
1407                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1408                         </actions>
1409                 </permacrud>
1410         </class>
1411
1412         <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">
1413                 <fields oils_persist:primary="code">
1414                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1415                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1416                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1417                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1418                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1419                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1420                 </fields>
1421                 <links/>
1422         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423             <actions>
1424                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1425                 <retrieve/>
1426                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1427                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1428             </actions>
1429         </permacrud>
1430         </class>
1431
1432         <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">
1433                 <fields oils_persist:primary="code">
1434                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1435                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1436                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1437                 </fields>
1438                 <links/>
1439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1440             <actions>
1441                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1442                 <retrieve/>
1443                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1444                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1445             </actions>
1446         </permacrud>
1447         </class>
1448
1449         <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">
1450                 <fields oils_persist:primary="code">
1451                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1452                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1453                 </fields>
1454                 <links/>
1455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1456             <actions>
1457                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1458                 <retrieve/>
1459                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1460                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1461             </actions>
1462         </permacrud>
1463         </class>
1464
1465         <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">
1466                 <fields oils_persist:primary="code">
1467                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1468                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1469                 </fields>
1470                 <links/>
1471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1472             <actions>
1473                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1474                 <retrieve/>
1475                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1476                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1477             </actions>
1478         </permacrud>
1479         </class>
1480
1481         <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">
1482                 <fields oils_persist:primary="code">
1483                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1484                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1485                 </fields>
1486                 <links/>
1487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1488             <actions>
1489                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1490                 <retrieve/>
1491                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1492                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1493             </actions>
1494         </permacrud>
1495         </class>
1496
1497         <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">
1498                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1499                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1500                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1501                 </fields>
1502                 <links/>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1506                 <retrieve/>
1507                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1508                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1509             </actions>
1510         </permacrud>
1511         </class>
1512
1513         <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">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1515                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1516                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1517                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1518                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1519                 </fields>
1520         <links>
1521             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1522             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1523             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1524         </links>
1525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1526             <actions>
1527                 <create permission="UPDATE_COPY">
1528                     <context link="target_copy" field="circ_lib"/>
1529                 </create>
1530                 <retrieve/>
1531                 <update permission="UPDATE_COPY">
1532                     <context link="target_copy" field="circ_lib"/>
1533                 </update>
1534                 <delete permission="UPDATE_COPY">
1535                     <context link="target_copy" field="circ_lib"/>
1536                 </delete>
1537             </actions>
1538         </permacrud>
1539         </class>
1540
1541         <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">
1542                 <fields oils_persist:primary="code">
1543                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1544                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1545                 </fields>
1546                 <links/>
1547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1548             <actions>
1549                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1550                 <retrieve/>
1551                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1552                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1553             </actions>
1554         </permacrud>
1555         </class>
1556
1557         <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">
1558                 <fields oils_persist:primary="code">
1559                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1560                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1561                 </fields>
1562                 <links/>
1563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1564             <actions>
1565                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1566                 <retrieve/>
1567                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1568                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1569             </actions>
1570         </permacrud>
1571         </class>
1572
1573         <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">
1574                 <fields oils_persist:primary="code">
1575                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1576                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1577                 </fields>
1578                 <links/>
1579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1580             <actions>
1581                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1582                 <retrieve/>
1583                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1584                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1585             </actions>
1586         </permacrud>
1587         </class>
1588
1589     <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">
1590         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1591             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1592             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1593             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1594             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1595             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1596             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1597             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1598             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1599             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1600             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1601             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1602             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1603             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1604             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1605             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1606             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1607             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1608         </fields>
1609         <links/>
1610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1611             <actions>
1612                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1613                 <retrieve/>
1614                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1615                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1616             </actions>
1617         </permacrud>
1618     </class>
1619
1620     <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">
1621         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1622             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1623             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1624             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1625             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1626             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1627             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1628             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1629             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1630             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1631             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1632             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1633             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1634             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1635             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1636             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1637             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1638             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1639             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1640             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1641         </fields>
1642         <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1648                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651     </class>
1652
1653     <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">
1654         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1655             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1656             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1657             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1658             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1659             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1660         </fields>
1661         <links>
1662             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1663             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1664             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1665         </links>
1666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1667             <actions>
1668                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1669                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1670                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1671                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1672             </actions>
1673         </permacrud>
1674     </class>
1675
1676         <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">
1677                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1678                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1679                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1680                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1681                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1682                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1683                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1684                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1685                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1686                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1687                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1688                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1689                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1690                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1691                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1692                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1693                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1694             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1695                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1696                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1697                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1698                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1699                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1700                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1701                 </fields>
1702                 <links>
1703                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1704                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1705                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1706                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1707                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1708                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1709                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1710                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1711                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1712                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1713                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1714                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1715                         <link field="age_hold_protect_rule" reltype="might_have" key="id" map="" class="crahp"/>
1716             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1717                 </links>
1718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1719             <actions>
1720                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1721                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1722                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1723                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1724             </actions>
1725         </permacrud>
1726         </class>
1727
1728         <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">
1729                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1730                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1731                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1732                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1733                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1734                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1735                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1736                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1737                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1738                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1739                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1740                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1741                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1742                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1743                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1744                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1745             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1746                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1747                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1748             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1749                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1750                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1751                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1752                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1753             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1754             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1755             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1756                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1757                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1758                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1759                 </fields>
1760                 <links>
1761                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1762                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1763                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1764                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1765                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1766                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1767                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1768                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1769                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1770                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1771                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1772                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1773                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1774                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1775             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1776                 </links>
1777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1778             <actions>
1779                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1780                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1781                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1782                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1783             </actions>
1784         </permacrud>
1785         </class>
1786
1787     <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">
1788         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1789             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1790             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1791             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1792         </fields>
1793         <links/>
1794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1795             <actions>
1796                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1797                 <retrieve/>
1798                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1799                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1800             </actions>
1801         </permacrud>
1802     </class>
1803
1804     <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">
1805         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1806             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1807             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1808             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1809             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1810             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1811             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1812             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1813         </fields>
1814         <links>
1815             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1816         </links>
1817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1818             <actions>
1819                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1820                 <retrieve/>
1821                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1822                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1823             </actions>
1824         </permacrud>
1825     </class>
1826
1827     <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">
1828         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1829             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1830             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1831             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1832             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1833             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1834         </fields>
1835         <links>
1836             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1837             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1838         </links>
1839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1840             <actions>
1841                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1842                     <context link="matchpoint" field="org_unit"/>
1843                 </create>
1844                 <retrieve/>
1845                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1846                     <context link="matchpoint" field="org_unit"/>
1847                 </update>
1848                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1849                     <context link="matchpoint" field="org_unit"/>
1850                 </delete>
1851             </actions>
1852         </permacrud>
1853     </class>
1854
1855     <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">
1856         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1857             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1858             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1859             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1860         </fields>
1861         <links>
1862             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1863             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1864         </links>
1865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1866             <actions>
1867                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1868                     <context link="limit_set" field="owning_lib"/>
1869                 </create>
1870                 <retrieve/>
1871                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1872                     <context link="limit_set" field="owning_lib"/>
1873                 </update>
1874                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1875                     <context link="limit_set" field="owning_lib"/>
1876                 </delete>
1877             </actions>
1878         </permacrud>
1879     </class>
1880     <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">
1881         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1882             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1883             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1884             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1885         </fields>
1886         <links>
1887             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1888             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1889         </links>
1890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891             <actions>
1892                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1893                     <context link="limit_set" field="owning_lib"/>
1894                 </create>
1895                 <retrieve/>
1896                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1897                     <context link="limit_set" field="owning_lib"/>
1898                 </update>
1899                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1900                     <context link="limit_set" field="owning_lib"/>
1901                 </delete>
1902             </actions>
1903         </permacrud>
1904     </class>
1905
1906     <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">
1907         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1908             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1909             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1910             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1911             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1912         </fields>
1913         <links>
1914             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1915             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1916         </links>
1917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1918             <actions>
1919                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1920                     <context link="limit_set" field="owning_lib"/>
1921                 </create>
1922                 <retrieve/>
1923                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1924                     <context link="limit_set" field="owning_lib"/>
1925                 </update>
1926                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1927                     <context link="limit_set" field="owning_lib"/>
1928                 </delete>
1929             </actions>
1930         </permacrud>
1931     </class>
1932
1933         <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">
1934                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1935                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1936                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1937                 </fields>
1938                 <links/>
1939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1940             <actions>
1941                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1942                 <retrieve/>
1943                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1944                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1945             </actions>
1946         </permacrud>
1947         </class>
1948
1949         <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">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1951                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1952                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1953                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1954                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1955                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1956                 </fields>
1957                 <links>
1958                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1959                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1960                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1961                 </links>
1962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1963             <actions>
1964                 <create permission="ADMIN_SURVEY">
1965                     <context link="survey" field="owner"/>
1966                 </create>
1967                 <retrieve/>
1968                 <update permission="ADMIN_SURVEY">
1969                     <context link="survey" field="owner"/>
1970                 </update>
1971                 <delete permission="ADMIN_SURVEY">
1972                     <context link="survey" field="owner"/>
1973                 </delete>
1974             </actions>
1975         </permacrud>
1976         </class>
1977         <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">
1978                 <fields oils_persist:primary="id" oils_persist:sequence="">
1979                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1980                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1981                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1982                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1983                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1984                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1985                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1986                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1987                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1988                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1989                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1990                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1991                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1992                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1993                 </fields>
1994                 <links>
1995                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1996                 </links>
1997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1998                         <actions>
1999                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2000                                         <context link="usr" field="home_ou" />
2001                                 </retrieve>
2002                         </actions>
2003                 </permacrud>
2004         </class>
2005         <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">
2006                 <fields oils_persist:primary="id" oils_persist:sequence="">
2007                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2008                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2009                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2010                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2011                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2012                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2013                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2014                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2015                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2016                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2017                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2018                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2019                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2020                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2021                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2022                 </fields>
2023                 <links>
2024                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2025                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2026                 </links>
2027         </class>
2028         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2029                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2030                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2031                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2032                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2033                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2034                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2035                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2036                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2037                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2038                 </fields>
2039                 <links>
2040                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2041                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2042                 </links>
2043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2044                         <actions> <!-- created magically, so no create action -->
2045                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2046                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2047                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2048                         </actions>
2049                 </permacrud>
2050         </class>
2051         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2052                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2053                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2054                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2055                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2056                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2057                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2058                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2059                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2060                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2061                 </fields>
2062                 <links>
2063                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2064                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2065                 </links>
2066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2067                         <actions> <!-- created magically, so no create action -->
2068                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2069                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2070                         </actions>
2071                 </permacrud>
2072         </class>
2073         <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">
2074                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2075                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2076                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2077                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2078                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2079                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2080                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2081                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2082                 </fields>
2083                 <links>
2084                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2086                 </links>
2087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2088             <actions>
2089                 <create permission="UPDATE_USER" context_field="owner">
2090                     <context link="usr" field="home_ou"/>
2091                 </create>
2092                                 <!-- note: public notes are still accessible via API -->
2093                 <retrieve permission="UPDATE_USER">
2094                     <context link="usr" field="home_ou"/>
2095                                 </retrieve>
2096                 <update permission="UPDATE_USER">
2097                     <context link="usr" field="home_ou"/>
2098                                 </update>
2099                 <delete permission="UPDATE_USER">
2100                     <context link="usr" field="home_ou"/>
2101                                 </delete>
2102             </actions>
2103         </permacrud>
2104         </class>
2105         <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">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2107                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2108                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2109                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2110                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2111                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2112                 </fields>
2113                 <links>
2114                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2115                 </links>
2116         </class>
2117         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2118                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2119                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2120                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2121                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2122                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2123                 </fields>
2124                 <links>
2125                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2126                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2127                 </links>
2128         </class>
2129         <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">
2130                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2131                         <field name="field" reporter:datatype="link"/>
2132                         <field name="id" reporter:datatype="id" />
2133                         <field name="source" reporter:datatype="link"/>
2134                         <field name="value" reporter:datatype="text"/>
2135                 </fields>
2136                 <links>
2137                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2138                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2139                 </links>
2140         </class>
2141         <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">
2142                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2143                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2144                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2145                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2146                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2147                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2148                 </fields>
2149                 <links>
2150                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2151                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2152                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2153                 </links>
2154         </class>
2155         <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">
2156                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2157                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2158                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2159                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2160                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2161                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2162                 </fields>
2163                 <links>
2164                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2165                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2166                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2167                 </links>
2168         </class>
2169         <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">
2170                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2171                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2172                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2173                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2174                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2175                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2176                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2177                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2178                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2179                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2180                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2181                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2182                 </fields>
2183                 <links>
2184                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2185                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2186                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2187                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2188                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2189                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2190                 </links>
2191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2192             <actions>
2193                 <create permission="TRANSIT_COPY" context_field="owner">
2194                     <context link="target_copy" field="circ_lib"/>
2195                 </create>
2196                 <retrieve/>
2197                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2198                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2199             </actions>
2200         </permacrud>
2201         </class>
2202         <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">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2204                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2205                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2207                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2209                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2210                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2211                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2212                 </fields>
2213                 <links>
2214                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2215                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2216                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2217                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2218                 </links>
2219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2220             <actions>
2221                 <create permission="ADMIN_SURVEY">
2222                     <context link="survey" field="owner"/>
2223                 </create>
2224                 <retrieve/>
2225                 <update permission="ADMIN_SURVEY">
2226                     <context link="survey" field="owner"/>
2227                 </update>
2228                 <delete permission="ADMIN_SURVEY">
2229                     <context link="survey" field="owner"/>
2230                 </delete>
2231             </actions>
2232         </permacrud>
2233         </class>
2234         <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">
2235                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2236                         <field name="bucket" />
2237                         <field name="id" reporter:datatype="id" />
2238                         <field name="target_copy" reporter:datatype="link"/>
2239                         <field name="create_time" reporter:datatype="timestamp" />
2240                         <field name="pos" reporter:datatype="int" />
2241                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2242                 </fields>
2243                 <links>
2244                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2245                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2246             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2247                 </links>
2248         </class>
2249         <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">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2251                         <field name="id" reporter:datatype="id" />
2252                         <field name="item" reporter:datatype="link"/>
2253                         <field name="note" reporter:datatype="text" />
2254                 </fields>
2255                 <links>
2256                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2257                 </links>
2258         </class>
2259
2260         <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">
2261                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2262                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2263                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2264                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2265                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2266                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2267                 </fields>
2268                 <links>
2269                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2270                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2271                 </links>
2272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2273                         <actions>
2274                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2275                                 <retrieve/>
2276                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2277                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2278                         </actions>
2279                 </permacrud>
2280         </class>
2281
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2284                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2285                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2286                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2287                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2288                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2289                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2290                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2291                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2292                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2293                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2294                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2295                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2296                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2297                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2298                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2299                 </fields>
2300                 <links>
2301                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2302                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2303                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2304                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2305                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2306                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2307                 </links>
2308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2309                         <actions>
2310                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2311                                 <retrieve/>
2312                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2313                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2314                         </actions>
2315                 </permacrud>
2316         </class>
2317
2318         <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">
2319                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2320                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2321                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2322                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2323                 </fields>
2324                 <links>
2325                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2326                 </links>
2327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2328                         <actions>
2329                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2330                                 <retrieve/>
2331                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2332                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2333                         </actions>
2334                 </permacrud>
2335         </class>
2336
2337         <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">
2338                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2339                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2340                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2341                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2342                 </fields>
2343                 <links>
2344                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2345                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2350                                 <retrieve/>
2351                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2352                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2353                         </actions>
2354                 </permacrud>
2355         </class>
2356
2357         <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">
2358                 <fields oils_persist:primary="code">
2359                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2360                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2361                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2362                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2363                 </fields>
2364                 <links>
2365                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2366                 </links>
2367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2368                         <actions>
2369                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2370                                 <retrieve/>
2371                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2372                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2373                         </actions>
2374                 </permacrud>
2375         </class>
2376
2377         <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">
2378                 <fields oils_persist:primary="code">
2379                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2380                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2381                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2382                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2383                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2384                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2385                 </fields>
2386                 <links>
2387                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2388                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2389                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2390                 </links>
2391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2392                         <actions>
2393                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2394                                 <retrieve/>
2395                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2396                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2397                         </actions>
2398                 </permacrud>
2399         </class>
2400
2401     <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">
2402         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2403             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2404             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2405             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2406         </fields>
2407         <links>
2408             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2409             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2410         </links>
2411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2412             <actions>
2413                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2414                 <retrieve/>
2415                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2416                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2417             </actions>
2418         </permacrud>
2419     </class>
2420
2421         <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">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2423                         <field name="active" reporter:datatype="bool"/>
2424                         <field name="create_date" reporter:datatype="timestamp"/>
2425                         <field name="creator" />
2426                         <field name="deleted" reporter:datatype="bool"/>
2427                         <field name="edit_date" reporter:datatype="timestamp"/>
2428                         <field name="editor" />
2429                         <field name="id" reporter:datatype="id" />
2430                         <field name="last_xact_id" />
2431                         <field name="marc" />
2432                         <field name="source" />
2433                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2434                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2435                         <field name="heading" />
2436                         <field name="simple_heading" />
2437                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2438                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2439                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2440                 </fields>
2441                 <links>
2442                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2443                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2444                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2445                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2446                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2447                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2448                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2449                 </links>
2450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2451                         <actions>
2452                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2453                                 <retrieve/>
2454                                 <update permission="UPDATE_MARC" global_required="true"/>
2455                                 <delete permission="UPDATE_MARC" global_required="true"/>
2456                         </actions>
2457                 </permacrud>
2458         </class>
2459         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2460                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2461                         <field name="char_encoding" />
2462                         <field name="id" />
2463                         <field name="record" />
2464                         <field name="record_status" />
2465                         <field name="thesaurus" />
2466                 </fields>
2467                 <links>
2468                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2469                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2470                 </links>
2471         </class>
2472         <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">
2473                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2474                         <field name="id" reporter:datatype="id" />
2475                         <field name="bib" reporter:datatype="link" />
2476                         <field name="authority" reporter:datatype="link" />
2477                 </fields>
2478                 <links>
2479                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2480                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2481                 </links>
2482         </class>
2483         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2484                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2485                         <field name="id" reporter:datatype="id" />
2486                         <field name="record" reporter:datatype="link" />
2487                         <field name="atag" reporter:datatype="link" />
2488                         <field name="value" reporter:datatype="text" />
2489                 </fields>
2490                 <links>
2491                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2492                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2493                 </links>
2494         </class>
2495         <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">
2496                 <fields oils_persist:primary="code" oils_persist:sequence="">
2497                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2498                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2499                 </fields>
2500                 <links/>
2501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2502             <actions>
2503                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2504                 <retrieve/>
2505                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2506                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2507             </actions>
2508         </permacrud>
2509         </class>
2510         <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">
2511                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2512                         <field name="accepting_usr" />
2513                         <field name="amount" reporter:datatype="money" />
2514                         <field name="amount_collected" reporter:datatype="money" />
2515                         <field name="approval_code" reporter:datatype="text"/>
2516                         <field name="cash_drawer" reporter:datatype="link"/>
2517                         <field name="cc_first_name" reporter:datatype="text"/>
2518                         <field name="cc_last_name" reporter:datatype="text"/>
2519                         <field name="cc_number" reporter:datatype="text"/>
2520                         <field name="cc_order_number" reporter:datatype="text"/>
2521                         <field name="cc_type" reporter:datatype="text"/>
2522                         <field name="cc_processor" reporter:datatype="text"/>
2523                         <field name="expire_month" reporter:datatype="int" />
2524                         <field name="expire_year" reporter:datatype="int" />
2525                         <field name="id" reporter:datatype="id" />
2526                         <field name="note" reporter:datatype="text"/>
2527                         <field name="payment_ts" reporter:datatype="timestamp"/>
2528                         <field name="xact" reporter:datatype="link"/>
2529                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2530                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2531                 </fields>
2532                 <links>
2533                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2534                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2535                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2536                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2537                 </links>
2538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2539             <actions>
2540                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2541                     <context link="xact" jump="usr" field="home_ou"/>
2542                 </retrieve>
2543                         </actions>
2544                 </permacrud>
2545         </class>
2546         <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">
2547                 <fields oils_persist:primary="name">
2548                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2549                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2550                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2551                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2552                 </fields>
2553                 <links/>
2554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2555             <actions>
2556                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2557                 <retrieve/>
2558                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2559                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2560             </actions>
2561         </permacrud>
2562         </class>
2563
2564         <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">
2565                 <fields oils_persist:primary="alias">
2566                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2567                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2568                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2569                 </fields>
2570                 <links>
2571                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2572                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2573                 </links>
2574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2575             <actions>
2576                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2577                 <retrieve/>
2578                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2579                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2580             </actions>
2581         </permacrud>
2582         </class>
2583
2584         <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">
2585                 <fields oils_persist:primary="name">
2586                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2587                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2588                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2589                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2590                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2591                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2592                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2593                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2594                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2595                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2596                 </fields>
2597                 <links>
2598                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2599                 </links>
2600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2601             <actions>
2602                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2603                 <retrieve/>
2604                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2605                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2606             </actions>
2607         </permacrud>
2608         </class>
2609
2610         <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">
2611                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2612                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2613                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2614                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2615                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2616                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2617                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2618                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2619                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2620                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2621                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2622                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2623                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2624                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2625                 </fields>
2626                 <links>
2627                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2628                 </links>
2629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2630             <actions>
2631                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2632                 <retrieve/>
2633                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2634                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2635             </actions>
2636         </permacrud>
2637         </class>
2638         <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">
2639                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2640                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2641                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2642                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2643                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2644                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2645                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2646                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2647                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2648                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2649                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2650                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2651                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2652                 </fields>
2653                 <links>
2654                 </links>
2655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2656                         <actions>
2657                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2658                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2659                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2660                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2661                         </actions>
2662                 </permacrud>
2663         </class>
2664         <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">
2665                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2666                         <field name="id" reporter:datatype="id" />
2667                         <field name="name" reporter:datatype="text"/>
2668                         <field name="xpath" reporter:datatype="text"/>
2669                         <field name="format" reporter:datatype="link"/>
2670                         <field name="first_word" reporter:datatype="bool" />
2671                 </fields>
2672                 <links/>
2673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2674             <actions>
2675                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2676                 <retrieve/>
2677                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2678                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2679             </actions>
2680         </permacrud>
2681         </class>
2682         <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">
2683                 <fields oils_persist:primary="code" oils_persist:sequence="">
2684                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2685                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2686                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2687                 </fields>
2688                 <links/>
2689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2690             <actions>
2691                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2692                 <retrieve/>
2693                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2694                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2695             </actions>
2696         </permacrud>
2697         </class>
2698         <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">
2699                 <fields oils_persist:primary="code" oils_persist:sequence="">
2700                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2701                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2702                 </fields>
2703                 <links/>
2704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2705             <actions>
2706                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2707                 <retrieve/>
2708                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2709                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2710             </actions>
2711         </permacrud>
2712         </class>
2713     <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">
2714         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2715             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2716             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2717             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2718             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2719         </fields>
2720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2721             <actions>
2722                 <retrieve/>
2723             </actions>
2724         </permacrud>
2725     </class>
2726         <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">
2727                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2728                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2729                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2730                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2731                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2732                 </fields>
2733                 <links>
2734                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2735                 </links>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2739                 <retrieve/>
2740                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2741                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2742             </actions>
2743         </permacrud>
2744         </class>
2745         <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">
2746                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2747                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2748                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2749                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2750                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2751                 </fields>
2752                 <links>
2753                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2754                 </links>
2755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2756             <actions>
2757                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2758                 <retrieve/>
2759                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2760                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2761             </actions>
2762         </permacrud>
2763         </class>
2764         <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">
2765                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2766                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2767                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2768                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2769                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2770                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2771                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2772                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2773                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2774                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2775                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2776                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2777                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2779                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2780                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2781                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2782                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2783                 </fields>
2784                 <links>
2785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2786                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2787                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2788                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2789                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2790                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2791                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2792                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2793                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2794                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2795                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2796                 </links>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2800                 <retrieve/>
2801                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2802                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2803             </actions>
2804         </permacrud>
2805         </class>
2806         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2807                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2808                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2809                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2810                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2811                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2812                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2813                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2814                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2815                 </fields>
2816                 <links>
2817                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2818                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2819         </links>
2820         </class>
2821         <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">
2822                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2824                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2825                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2826                 </fields>
2827                 <links>
2828                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2829                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2830                 </links>
2831         </class>
2832         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2833                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2834                         <field name="id" reporter:datatype="id" />
2835                         <field name="value" oils_persist:i18n="true" />
2836                 </fields>
2837                 <links/>
2838         </class>
2839         <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">
2840                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2841                         <field name="balance_owed" reporter:datatype="money" />
2842                         <field name="total_owed" reporter:datatype="money" />
2843                         <field name="total_paid" reporter:datatype="money" />
2844                         <field name="usr" reporter:datatype="link"/>
2845                 </fields>
2846                 <links>
2847                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2848         </links>
2849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2850             <actions>
2851                 <retrieve permission="VIEW_USER">
2852                     <context link="usr" field="home_ou"/>
2853                 </retrieve>
2854             </actions>
2855         </permacrud>
2856         </class>
2857         <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">
2858                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2859                         <field name="collector" />
2860                         <field name="enter_time" reporter:datatype="timestamp"/>
2861                         <field name="id" reporter:datatype="id" />
2862                         <field name="location" reporter:datatype="link"/>
2863                         <field name="usr" reporter:datatype="link"/>
2864                 </fields>
2865                 <links>
2866                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2867                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2868                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2869                 </links>
2870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2871             <actions>
2872                 <create permission="money.collections_tracker.create" context_field="location"/>
2873                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2874                 <delete permission="money.collections_tracker.create" context_field="location"/>
2875             </actions>
2876         </permacrud>
2877         </class>
2878         <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">
2879                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2880                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2881                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2882                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2883                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2884                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2885                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2886                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2887                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2888                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2889                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2890                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2891                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2892                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2893                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2894                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2895                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2896                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2897                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2898                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2903                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2904                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2905                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2906                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2907                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2908                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2910                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2911                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2912                 </fields>
2913                 <links>
2914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2915                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2916                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2917                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2918                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2919                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2920                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2921                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2922                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2923                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2924                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2925                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2926                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2927                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2928                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2929                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2930                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2931                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2932                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2933                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2934                 </links>
2935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2936             <actions>
2937                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2938                 <retrieve/>
2939                 <update permission="UPDATE_MARC" global_required="true"/>
2940                 <!-- 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. -->
2941                 <delete permission="DELETE_RECORD" global_required="true"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="id">
2947                         <field name="dow_0_close" />
2948                         <field name="dow_0_open" />
2949                         <field name="dow_1_close" />
2950                         <field name="dow_1_open" />
2951                         <field name="dow_2_close" />
2952                         <field name="dow_2_open" />
2953                         <field name="dow_3_close" />
2954                         <field name="dow_3_open" />
2955                         <field name="dow_4_close" />
2956                         <field name="dow_4_open" />
2957                         <field name="dow_5_close" />
2958                         <field name="dow_5_open" />
2959                         <field name="dow_6_close" />
2960                         <field name="dow_6_open" />
2961                         <field name="id" reporter:datatype="id" />
2962                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2963                 </fields>
2964                 <links>
2965                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2966                 </links>
2967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2968             <actions>
2969                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2970                 <retrieve/>
2971                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2972                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2973             </actions>
2974         </permacrud>
2975         </class>
2976         <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">
2977                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2978                         <field name="id" reporter:datatype="id" />
2979                         <field name="record" reporter:datatype="link"/>
2980                         <field name="label" reporter:datatype="text"/>
2981                         <field name="label_sortkey" reporter:datatype="text"/>
2982                 </fields>
2983                 <links>
2984                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2985                 </links>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2989                 <retrieve/>
2990                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2991                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2997                         <field name="id" reporter:datatype="id" />
2998                         <field name="target_copy" reporter:datatype="link" />
2999                         <field name="part" reporter:datatype="link"/>
3000                 </fields>
3001                 <links>
3002                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3003                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3004                 </links>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3008                 <retrieve/>
3009                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3010                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014         <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">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3016                         <field name="close_end" reporter:datatype="timestamp" />
3017                         <field name="close_start" reporter:datatype="timestamp" />
3018                         <field name="id" reporter:datatype="id" />
3019                         <field name="org_unit" reporter:datatype="org_unit"/>
3020                         <field name="reason" reporter:datatype="text"/>
3021                 </fields>
3022                 <links>
3023                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3024                 </links>
3025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3026             <actions>
3027                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3028                 <retrieve/>
3029                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3030                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3031             </actions>
3032         </permacrud>
3033         </class>
3034         <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">
3035                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3036                         <field name="extended" reporter:datatype="interval"/>
3037                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3038                         <field name="max_renewals" reporter:datatype="int" />
3039                         <field name="name" reporter:datatype="text"/>
3040                         <field name="normal" reporter:datatype="interval"/>
3041                         <field name="shrt" reporter:datatype="interval"/>
3042                 </fields>
3043                 <links>
3044                 </links>
3045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3046             <actions>
3047                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3048                 <retrieve/>
3049                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3050                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3051             </actions>
3052         </permacrud>
3053         </class>
3054
3055         <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">
3056                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3057                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3058                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3059             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3060                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3061             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3062                 </fields>
3063                 <links>
3064             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3065                 </links>
3066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3067             <actions>
3068                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3069                 <retrieve/>
3070                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3071                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3072             </actions>
3073                 </permacrud>
3074         </class>
3075
3076         <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">
3077                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3078                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3079                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3080                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3081             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3082                 </fields>
3083                 <links>
3084                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3085                 </links>
3086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3091                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3092             </actions>
3093                 </permacrud>
3094         </class>
3095
3096         <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">
3097                 <fields oils_persist:primary="id" oils_persist:sequence="">
3098                         <field name="balance_owed" reporter:datatype="money"/>
3099                         <field name="id" reporter:datatype="id" />
3100                         <field name="last_billing_note" reporter:datatype="text"/>
3101                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3102                         <field name="last_billing_type" reporter:datatype="text"/>
3103                         <field name="last_payment_note" reporter:datatype="text"/>
3104                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3105                         <field name="last_payment_type" reporter:datatype="text"/>
3106                         <field name="total_owed" reporter:datatype="money"/>
3107                         <field name="total_paid" reporter:datatype="money"/>
3108                         <field name="usr" reporter:datatype="link"/>
3109                         <field name="xact_finish" reporter:datatype="timestamp" />
3110                         <field name="xact_start" reporter:datatype="timestamp" />
3111                         <field name="xact_type" reporter:datatype="text"/>
3112                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3113                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3114                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3116                         <field name="billing_location" reporter:datatype="link"/>
3117                 </fields>
3118                 <links>
3119                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3120                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3121                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3122                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3123                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3124                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3125                 </links>
3126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3127                         <actions>
3128                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3129                                         <context link="usr" field="home_ou" />
3130                                 </retrieve>
3131                         </actions>
3132                 </permacrud>
3133         </class>
3134         <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">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3136                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3137                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3138                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3140                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3141                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3142                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3143                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3144                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3146                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3148                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3149                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3150                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3151                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3152                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3153                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3154                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3155                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3156                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3157                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3158                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3159                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3160                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3161                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3162                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3163                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3164                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3165                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3166                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3167                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3168                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3169                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3170                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3171                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3172                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3173                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3174                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3175                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3176                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3177                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3178                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3179                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3180                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3181                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3182                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3183                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3184                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3185                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3186                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3187                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3188                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3189                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3190                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3199                 </fields>
3200                 <links>
3201                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3202                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3203                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3204                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3205                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3206                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3207                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3208                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3209                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3210                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3211                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3212                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3213                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3214                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3215                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3216                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3217                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3218                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3219                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3220                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3221                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3222                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3223                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3224                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3225                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3226                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3227                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3228                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3229                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3230                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3231                 </links>
3232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3233                         <actions>
3234                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3235                         </actions>
3236                 </permacrud>
3237         </class>
3238         <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">
3239                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3240                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3241                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3242                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3243                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3244                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3245                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3246                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3247                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3248         </fields>
3249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250                         <actions>
3251                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3252                                 <retrieve/>
3253                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3254                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3255                         </actions>
3256                 </permacrud>
3257         </class>
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3260                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3261                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3262                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3263                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3264         </fields>
3265         <links>
3266                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3267                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3268                 </links>
3269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270                         <actions>
3271                                 <retrieve permission="RUN_REPORTS">
3272                                         <context link="usr" field="home_ou" />
3273                                 </retrieve>
3274                         </actions>
3275                 </permacrud>
3276         </class>
3277         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3279                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3280                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3281                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3282                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3283                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3284                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3285         </fields>
3286         <links>
3287                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3288                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3289                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3290                 </links>
3291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3292                         <actions>
3293                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3294                                         <context link="usr" field="home_ou" />
3295                                         <context link="ws" field="owning_lib" />
3296                                 </retrieve>
3297                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3298                                         <context link="usr" field="home_ou" />
3299                                         <context link="ws" field="owning_lib" />
3300                                 </create>
3301                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3302                                         <context link="usr" field="home_ou" />
3303                                         <context link="ws" field="owning_lib" />
3304                                 </update>
3305                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3306                                         <context link="usr" field="home_ou" />
3307                                         <context link="ws" field="owning_lib" />
3308                                 </delete>
3309                         </actions>
3310                 </permacrud>
3311         </class>
3312         <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">
3313                 <fields oils_persist:primary="name">
3314                         <field name="name" reporter:datatype="text"/>
3315                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3316                 </fields>
3317                 <links/>
3318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3319                         <actions>
3320                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3321                                 <retrieve/>
3322                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3323                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3324                         </actions>
3325                 </permacrud>
3326         </class>
3327         <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">
3328                 <fields oils_persist:primary="name">
3329                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3330                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3331                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3332                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3333                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3334                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3335                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3336                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3337                 </fields>
3338                 <links>
3339                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3340                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3341                 </links>
3342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3343                         <actions>
3344                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3345                                 <retrieve/>
3346                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3347                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3348                         </actions>
3349                 </permacrud>
3350         </class>
3351         <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">
3352                 <fields oils_persist:primary="name">
3353                         <field name="name" reporter:datatype="text"/>
3354                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3355                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3356                         <field name="datatype" reporter:datatype="text"/>
3357                         <field name="view_perm" reporter:datatype="link"/>
3358                         <field name="update_perm" reporter:datatype="link"/>
3359                         <field name="fm_class" reporter:datatype="text"/>
3360                         <field name="grp" reporter:datatype="link"/>
3361                 </fields>
3362                 <links>
3363                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3364                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3365                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3366                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3367                 </links>
3368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3369                         <actions>
3370                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3371                                 <retrieve/>
3372                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3373                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3374                         </actions>
3375                 </permacrud>
3376         </class>
3377         <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">
3378                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3379                         <field name="id" />
3380                         <field name="name"  reporter:datatype="text"/>
3381                         <field name="org_unit" reporter:datatype="org_unit"/>
3382                         <field name="value"  reporter:datatype="text"/>
3383                 </fields>
3384                 <links>
3385                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3386                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3387                 </links>
3388         </class>
3389         <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">
3390                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3391                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3392                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3393                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3394                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3395                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3396                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3397                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3398                 </fields>
3399                 <links>
3400                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3401                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3402                 </links>
3403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3404             <actions>
3405                 <create permission="CREATE_COPY_NOTE">
3406                     <context link="owning_copy" field="circ_lib"/>
3407                 </create>
3408                 <retrieve permission="VIEW_COPY_NOTES">
3409                     <context link="owning_copy" field="circ_lib"/>
3410                 </retrieve>
3411                 <update permission="UPDATE_COPY_NOTE">
3412                     <context link="owning_copy" field="circ_lib"/>
3413                 </update>
3414                 <delete permission="DELETE_COPY_NOTE">
3415                     <context link="owning_copy" field="circ_lib"/>
3416                 </delete>
3417             </actions>
3418         </permacrud>
3419         </class>
3420         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3421                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3422                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3423                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3424                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3425                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3426                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3427                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3428                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3429                 </fields>
3430                 <links>
3431                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3432                 </links>
3433         </class>
3434         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3435                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3436                         <field name="fingerprint"  reporter:datatype="text"/>
3437                         <field name="id" reporter:datatype="id" />
3438                         <field name="master_record" reporter:datatype="link"/>
3439                         <field name="mods"  reporter:datatype="text"/>
3440                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3441                 </fields>
3442                 <links>
3443                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3444                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3445                 </links>
3446         </class>
3447         <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">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3449                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3450                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3451                 </fields>
3452                 <links/>
3453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454             <actions>
3455                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3456                 <retrieve/>
3457                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3458                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3459             </actions>
3460         </permacrud>
3461         </class>
3462         <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">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3464                         <field name="code"  reporter:datatype="text"/>
3465                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3466                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3467                 </fields>
3468                 <links/>
3469         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3470             <actions>
3471                 <create permission="CREATE_PERM" global_required="true"/>
3472                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3473                 <update permission="UPDATE_PERM" global_required="true"/>
3474                 <delete permission="DELETE_PERM" global_required="true"/>
3475             </actions>
3476         </permacrud>
3477         </class>
3478         <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">
3479                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3480                         <field name="id" reporter:datatype="id" />
3481                         <field name="metarecord" reporter:datatype="link"/>
3482                         <field name="source" reporter:datatype="link"/>
3483                 </fields>
3484                 <links>
3485                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3486                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3487                 </links>
3488         </class>
3489         <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">
3490                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3491                         <field name="id" reporter:datatype="id" />
3492                         <field name="field" reporter:datatype="link"/>
3493                         <field name="source" reporter:datatype="link"/>
3494                         <field name="value"  reporter:datatype="text"/>
3495                 </fields>
3496                 <links>
3497                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3498                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3499                 </links>
3500         </class>
3501         <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">
3502                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3503                         <field name="id" reporter:datatype="id" />
3504                         <field name="value" reporter:datatype="text"/>
3505                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3506                 </fields>
3507                 <links>
3508                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3509                 </links>
3510         </class>
3511         <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">
3512                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3513                         <field name="id" reporter:datatype="id" />
3514                         <field name="entry" reporter:datatype="link"/>
3515                         <field name="def" reporter:datatype="link"/>
3516                         <field name="source" reporter:datatype="link"/>
3517                 </fields>
3518                 <links>
3519                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3520                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3521                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3522                 </links>
3523         </class>
3524         <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">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3526                         <field name="id" reporter:datatype="id" />
3527                         <field name="entry" reporter:datatype="link"/>
3528                         <field name="simple_heading" reporter:datatype="link"/>
3529                 </fields>
3530                 <links>
3531                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3532                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3533                 </links>
3534         </class>
3535         <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">
3536                 <oils_persist:source_definition>
3537                         SELECT * FROM metabib.author_field_entry
3538                                                 UNION ALL
3539                         SELECT * FROM metabib.keyword_field_entry
3540                                                 UNION ALL
3541                         SELECT * FROM metabib.identifier_field_entry
3542                                                 UNION ALL
3543                         SELECT * FROM metabib.title_field_entry
3544                                                 UNION ALL
3545                         SELECT * FROM metabib.subject_field_entry
3546                                                 UNION ALL
3547                         SELECT * FROM metabib.series_field_entry
3548                 </oils_persist:source_definition>
3549                 <fields>
3550                         <field name="field" reporter:datatype="link"/>
3551                         <field name="id" reporter:datatype="id" />
3552                         <field name="source" reporter:datatype="link"/>
3553                         <field name="value"  reporter:datatype="text"/>
3554                 </fields>
3555                 <links>
3556                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3557                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3558                 </links>
3559         </class>
3560         <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">
3561                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3562                         <field name="field" reporter:datatype="link"/>
3563                         <field name="id" reporter:datatype="id" />
3564                         <field name="source" reporter:datatype="link"/>
3565                         <field name="value"  reporter:datatype="text"/>
3566                 </fields>
3567                 <links>
3568                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3569                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3570                 </links>
3571         </class>
3572         <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">
3573                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3574                         <field name="accepting_usr" reporter:datatype="link"/>
3575                         <field name="amount" reporter:datatype="money" />
3576                         <field name="amount_collected" reporter:datatype="money" />
3577                         <field name="cash_drawer" reporter:datatype="link"/>
3578                         <field name="id" reporter:datatype="id" />
3579                         <field name="note"  reporter:datatype="text"/>
3580                         <field name="payment_ts" reporter:datatype="timestamp"/>
3581                         <field name="xact" reporter:datatype="link"/>
3582                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3583                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3584                 </fields>
3585                 <links>
3586                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3587                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3588                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3589                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3590                 </links>
3591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3592             <actions>
3593                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3594                     <context link="xact" jump="usr" field="home_ou"/>
3595                 </retrieve>
3596                         </actions>
3597                 </permacrud>
3598         </class>
3599         <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">
3600                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3601                         <field name="accepting_usr" reporter:datatype="link"/>
3602                         <field name="amount" reporter:datatype="money" />
3603                         <field name="amount_collected" reporter:datatype="money" />
3604                         <field name="id" reporter:datatype="id" />
3605                         <field name="note"  reporter:datatype="text"/>
3606                         <field name="payment_ts" reporter:datatype="timestamp"/>
3607                         <field name="xact" reporter:datatype="link"/>
3608                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3609                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3610                 </fields>
3611                 <links>
3612                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3613                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3614                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3615                 </links>
3616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3617             <actions>
3618                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3619                     <context link="xact" jump="usr" field="home_ou"/>
3620                 </retrieve>
3621                         </actions>
3622                 </permacrud>
3623         </class>
3624         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3625                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3626                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3627                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3628                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3629                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3630                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3631                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3632                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3633                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3634                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3635                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3636                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3637                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3638                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3639                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3640                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3641                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3642                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3643                 </fields>
3644                 <links>
3645                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3646                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3647                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3648                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3649                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3650                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3651                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3652                 </links>
3653         </class>
3654
3655         <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">
3656                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3657                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3658                         <field name="name"  reporter:datatype="text"/>
3659                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3660                         <field name="block_list" reporter:datatype="text"/>
3661                         <field name="staff_alert" reporter:datatype="bool"/>
3662                         <field name="org_depth" reporter:datatype="int"/>
3663                 </fields>
3664                 <links/>
3665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3666             <actions>
3667                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3668                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3669                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3670                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3671             </actions>
3672         </permacrud>
3673         </class>
3674         <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">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3676                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3677                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3678                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3679                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3680                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3681                 </fields>
3682                 <links>
3683                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3684                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3685                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3686         </links>
3687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3688             <actions>
3689                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3690                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3691                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3692                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3693             </actions>
3694         </permacrud>
3695         </class>
3696         <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">
3697                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3698                         <field name="holdable" reporter:datatype="bool"/>
3699                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3700                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3701                         <field name="opac_visible" reporter:datatype="bool"/>
3702             <field name="copy_active" reporter:datatype="bool"/>
3703             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3704                 </fields>
3705                 <links/>
3706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3707             <actions>
3708                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3709                 <retrieve/>
3710                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3711                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3712             </actions>
3713         </permacrud>
3714         </class>
3715         <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">
3716                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3717                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3718                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3719                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3720                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3721                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3722                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3723                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3724                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3725                 </fields>
3726                 <links>
3727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3728                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3729                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3730                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3731                 </links>
3732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3733                         <actions>
3734                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3735                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3736                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3737                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3738                         </actions>
3739                 </permacrud>
3740         </class>
3741         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3742                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3743                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3744                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3745                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3746                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3747                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3748                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3749                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3750                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3751                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3752                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3753                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3754                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3755                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3756                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3757                 </fields>
3758                 <links>
3759                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3760                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3761                 </links>
3762         </class>
3763         <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">
3764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3765                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3766                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3767                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3768                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3769                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3770                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3771                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3772                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3773                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3774                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3775                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3776                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3777                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3778                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3779                 </fields>
3780                 <links>
3781                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3782                 </links>
3783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3784                         <actions>
3785                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3786                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3787                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3788                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3789                         </actions>
3790                 </permacrud>
3791         </class>
3792
3793
3794         <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">
3795                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3796                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3797                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3798                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3799                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3800                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3801                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3802                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3803                 </fields>
3804                 <links>
3805                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3806                 </links>
3807         </class>
3808
3809         <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">
3810                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3811                         <field name="call_number" />
3812                         <field name="create_date" reporter:datatype="timestamp"/>
3813                         <field name="creator" reporter:datatype="link"/>
3814                         <field name="id" reporter:datatype="id" />
3815                         <field name="pub" reporter:datatype="bool"/>
3816                         <field name="title"  reporter:datatype="text"/>
3817                         <field name="value"  reporter:datatype="text"/>
3818                 </fields>
3819                 <links>
3820                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3821                 </links>
3822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3823             <actions>
3824                 <create permission="CREATE_VOLUME_NOTE">
3825                     <context link="call_number" field="owning_lib"/>
3826                 </create>
3827                 <retrieve permission="VIEW_VOLUME_NOTES">
3828                     <context link="call_number" field="owning_lib"/>
3829                 </retrieve>
3830                 <update permission="UPDATE_VOLUME_NOTE">
3831                     <context link="call_number" field="owning_lib"/>
3832                 </update>
3833                 <delete permission="DELETE_VOLUME_NOTE">
3834                     <context link="call_number" field="owning_lib"/>
3835                 </delete>
3836             </actions>
3837         </permacrud>
3838         </class>
3839         <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">
3840                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3841                         <field name="create_date" reporter:datatype="timestamp"/>
3842                         <field name="creator" reporter:datatype="link"/>
3843                         <field name="edit_date" reporter:datatype="timestamp"/>
3844                         <field name="editor" reporter:datatype="link"/>
3845                         <field name="id" reporter:datatype="id" />
3846                         <field name="record" reporter:datatype="link"/>
3847                         <field name="value" reporter:datatype="text"/>
3848                 </fields>
3849                 <links>
3850                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3851                 </links>
3852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853             <actions>
3854                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3855                 <retrieve/>
3856                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3857                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3858             </actions>
3859         </permacrud>
3860         </class>
3861         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3862         <oils_persist:source_definition>
3863 SELECT  usr,
3864         SUM(
3865             CASE
3866                 WHEN (
3867                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3868                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3869                 ) THEN 1
3870                 ELSE 0
3871             END
3872         ) AS out,
3873
3874         SUM(
3875             CASE
3876                 WHEN (
3877                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3878                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3879                 ) THEN 1
3880                 ELSE 0
3881             END
3882         ) AS overdue,
3883
3884         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3885         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3886         SUM( CASE WHEN stop_fines = 'LONGOVERDUE' THEN 1 ELSE 0 END) AS long_overdue
3887   FROM  action.circulation
3888   WHERE checkin_time IS NULL
3889   GROUP BY 1
3890         </oils_persist:source_definition>
3891         <fields oils_persist:primary="usr">
3892             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3893             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3894             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3895             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3896             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3897             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3898         </fields>
3899         <links>
3900             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3901         </links>
3902         </class>
3903         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3904         <oils_persist:source_definition>
3905 SELECT  usr,
3906         STRING_AGG(
3907             CASE
3908                 WHEN (
3909                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3910                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3911                 ) THEN id::TEXT
3912                 ELSE '0'
3913             END
3914         ,',') AS out,
3915
3916         STRING_AGG(
3917             CASE
3918                 WHEN (
3919                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3920                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3921                 ) THEN id::TEXT
3922                 ELSE '0'
3923             END
3924         ,',') AS overdue,
3925
3926         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3927         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3928         STRING_AGG( CASE WHEN stop_fines = 'LONGOVERDUE' THEN id::TEXT ELSE '0' END,',') AS long_overdue
3929   FROM  action.circulation
3930   WHERE checkin_time IS NULL
3931   GROUP BY 1
3932         </oils_persist:source_definition>
3933         <fields oils_persist:primary="usr">
3934             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3935             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3936             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3937             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3938             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3939             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3940         </fields>
3941         <links>
3942             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3943         </links>
3944         </class>
3945         <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">
3946                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3947                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3948                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3949                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3950                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3951                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3952                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3953                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3954                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3955                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3956                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3957                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3958                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3959                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3960                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3961                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3962                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3963                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3964                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3965                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3966                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3967                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3968                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3969                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3970                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3971                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
3972                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3973                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3974                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3975                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3976                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3977                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3978                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3979                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3980                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3981                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3982                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3983                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3984                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3985                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3986                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3987                 </fields>
3988                 <links>
3989                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3990                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3991                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3992                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3993                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3994                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3995                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3996                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3997                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3998                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3999                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4000                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4001                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4002                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4003                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4004                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4005                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4006                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4007                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4008                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4009                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4010                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4011                 </links>
4012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4013                         <actions>
4014                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4015                         </actions>
4016                 </permacrud>
4017         </class>
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4020                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4021                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4022                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4023                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4024                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4025                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4026                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4027                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4028                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4029                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4030                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4031                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4032                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4033                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4034                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4035                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4036                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4037                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4038                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4039                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4040                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4041                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4042                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4043                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4044                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4045                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4046                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4047                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4048                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4049                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4050                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4051                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4052                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4053                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4054                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4055                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4056                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4057                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4058                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4059                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4060                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4061                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4062                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4063                 </fields>
4064                 <links>
4065                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4066                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4067                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4068                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4069                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4070                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4071                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4072                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4073                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4074                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4075                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4076                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4077                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4078                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4079                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4080                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4081                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4082                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4083                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4084                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4085                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4086                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4087                 </links>
4088         </class>
4089         <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">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4091                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4092                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4093                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4094                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4095                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4096                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4097                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4098                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4099                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4100                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4101                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4102                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4103                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4104                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4105                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4106                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4107                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4108                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4109                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4110                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4111                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4112                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4113                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4114                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4115                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4116                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4117                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4118                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4119                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4120                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4121                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4122                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4123                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4124                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4125                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4126                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4127                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4128                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4129                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4130                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4131                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4132                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4133                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4134                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4135                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4136                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4137                 </fields>
4138                 <links>
4139                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4140                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4141                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4142                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4143                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4144                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4145                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4146                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4147                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4148                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4149                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4150                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4151                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4152                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4153                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4154                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4155                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4156                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4157                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4158                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4159                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4160                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4161                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4162                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4163                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4164                 </links>
4165         </class>
4166
4167         <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">
4168                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4169                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4170                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4171                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4172                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4173                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4174                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4175                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4176                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4177                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4178                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4179                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4180                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4181                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4182                 </fields>
4183                 <links>
4184                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4185                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4186                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4187                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4188                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4189                 </links>
4190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4191                         <actions>
4192                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4193                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4194                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4195                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4196                         </actions>
4197                 </permacrud>
4198         </class>
4199
4200         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4201                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4202                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4203                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4204                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4205                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4207                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4208                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4209                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4210                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4211                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4212                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4213                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4214                 </fields>
4215                 <links>
4216                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4217                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4218                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4219                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4220                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4221                 </links>
4222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4223                         <actions>
4224                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4225                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4226                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4227                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4228                         </actions>
4229                 </permacrud>
4230         </class>
4231         
4232         <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">
4233                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4234                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4235                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4236                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4237                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4238                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4239                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4240                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4241                 </fields>
4242                 <links>
4243                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4244                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4245                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4246                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4247                 </links>
4248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4249                         <actions>
4250                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4251                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4252                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4253                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4254                         </actions>
4255                 </permacrud>
4256         </class>
4257         
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4260                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4261                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4262                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4263                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4264                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4265                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4266                 </fields>
4267                 <links>
4268                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4269                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4270                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4271                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4272                 </links>
4273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4274                         <actions>
4275                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4276                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4277                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4278                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4279                         </actions>
4280                 </permacrud>
4281         </class>
4282         
4283         <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">
4284                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4285                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4286                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4287                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4288                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4289                 </fields>
4290                 <links>
4291                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4292                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4293                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4294                 </links>
4295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4296                         <actions>
4297                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4298                     <context link="resource" field="owner" />
4299                 </create>
4300                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4301                     <context link="resource" field="owner" />
4302                 </retrieve>
4303                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4304                     <context link="resource" field="owner" />
4305                 </update>
4306                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4307                     <context link="resource" field="owner" />
4308                 </delete>
4309                         </actions>
4310                 </permacrud>
4311         </class>
4312         
4313         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4314                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4315                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4316                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4317                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4318                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4319                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4320                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4321                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4322                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4323                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4324                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4326                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4327                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4328                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4329                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4330                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4331                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4332                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4333                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4334                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4335                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4336                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4337                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4338                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4339                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4340                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4341                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4342                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4343                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4344                 </fields>
4345                 <links>
4346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4347                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4348                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4349                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4350                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4351                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4352                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4353                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4354                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4355                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4356                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4357                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4358                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4359                 </links>
4360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4361                         <actions>
4362                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4363                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4364                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4365                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4366                         </actions>
4367                 </permacrud>
4368         </class>
4369         
4370         <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">
4371                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4372                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4373                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4374                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4375                 </fields>
4376                 <links>
4377                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4378                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4379                 </links>
4380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4381                         <actions>
4382                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4383                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4384                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4385                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4386                         </actions>
4387                 </permacrud>
4388         </class>
4389
4390         <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">
4391                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4392                         <field name="bucket" reporter:datatype="link"/>
4393                         <field name="id" reporter:datatype="id" />
4394                         <field name="target_call_number" reporter:datatype="link" />
4395                         <field name="create_time" reporter:datatype="timestamp" />
4396                         <field name="pos" reporter:datatype="int" />
4397                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4398                 </fields>
4399                 <links>
4400                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4401                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4402             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4403                 </links>
4404         </class>
4405         <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">
4406                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4407                         <field name="id" reporter:datatype="id" />
4408                         <field name="item" reporter:datatype="link"/>
4409                         <field name="note" reporter:datatype="text" />
4410                 </fields>
4411                 <links>
4412                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4413                 </links>
4414         </class>
4415         <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">
4416                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4417                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field name="btype" reporter:datatype="text"/>
4419                         <field name="id" reporter:datatype="id" />
4420                         <field name="name" reporter:datatype="text"/>
4421                         <field name="description" reporter:datatype="text"/>
4422                         <field name="owner" reporter:datatype="link"/>
4423                         <field name="pub" reporter:datatype="bool"/>
4424                         <field name="create_time" reporter:datatype="timestamp" />
4425                 </fields>
4426                 <links>
4427                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4428                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4429                 </links>
4430         </class>
4431         <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">
4432                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4433                         <field name="id" reporter:datatype="id" />
4434                         <field name="bucket" reporter:datatype="link"/>
4435                         <field name="note" reporter:datatype="text" />
4436                 </fields>
4437                 <links>
4438                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4439                 </links>
4440         </class>
4441         <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">
4442                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4443                         <field name="hold" reporter:datatype="link"/>
4444                         <field name="id" reporter:datatype="id" />
4445                         <field name="target_copy" reporter:datatype="link"/>
4446                         <field name="proximity" reporter:datatype="number"/>
4447                 </fields>
4448                 <links>
4449                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4450                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4451                 </links>
4452         </class>
4453         <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">
4454                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4455                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4456                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4457                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4458                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4459                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4460                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4461                 </fields>
4462                 <links>
4463                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4464                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4465                 </links>
4466         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4467             <actions>
4468                 <create permission="CREATE_HOLD_NOTIFICATION">
4469                                         <context link="hold" jump="usr" field="home_ou" />
4470                                 </create>
4471                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4472                                         <context link="hold" jump="usr" field="home_ou" />
4473                                 </retrieve>
4474                 <update permission="CREATE_HOLD_NOTIFICATION">
4475                                         <context link="hold" jump="usr" field="home_ou" />
4476                                 </update>
4477                 <delete permission="CREATE_HOLD_NOTIFICATION">
4478                                         <context link="hold" jump="usr" field="home_ou" />
4479                                 </delete>
4480             </actions>
4481         </permacrud>
4482         </class>
4483         <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">
4484                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4485                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4486                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4487                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4488                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4489                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4490                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4491                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4492                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4493                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4494                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4495                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4496                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4497                 </fields>
4498                 <links>
4499                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4500                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4501                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4502                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4503                 </links>
4504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4505             <actions>
4506                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4507                 <retrieve/>
4508                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4509                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4510             </actions>
4511         </permacrud>
4512         </class>
4513         <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">
4514                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4515                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4516                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4517                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4518                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4519             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4520             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4521             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4522                 </fields>
4523                 <links>
4524                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4525                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4526                 </links>
4527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4528             <actions>
4529                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4530                 <retrieve/>
4531                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4532                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4533             </actions>
4534         </permacrud>
4535         </class>
4536         <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">
4537                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4538                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4539             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4540             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4541                 </fields>
4542                 <links>
4543                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4544                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4545                 </links>
4546         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4547             <actions>
4548                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4549                                         <context link="lgroup" field="owner" />
4550                 </create>
4551                 <retrieve/>
4552                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4553                                         <context link="lgroup" field="owner" />
4554                 </update>
4555                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4556                                         <context link="lgroup" field="owner" />
4557                 </delete>
4558             </actions>
4559         </permacrud>
4560         </class>
4561
4562     <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">
4563         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4564             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4565             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4566             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4567             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4568         </fields>
4569         <links>
4570             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4571             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4572         </links>
4573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4574             <actions>
4575                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4576                 <retrieve/>
4577                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4578                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4579             </actions>
4580         </permacrud>
4581     </class>
4582
4583         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4584                 <fields>
4585                         <field name="sre_id" oils_persist:virtual="true" />
4586                         <field name="location" oils_persist:virtual="true" />
4587                         <field name="owning_lib" oils_persist:virtual="true" />
4588                         <field name="basic_holdings" oils_persist:virtual="true" />
4589                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4590                         <field name="supplement_holdings" oils_persist:virtual="true" />
4591                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4592                         <field name="index_holdings" oils_persist:virtual="true" />
4593                         <field name="index_holdings_add" oils_persist:virtual="true" />
4594                         <field name="online" oils_persist:virtual="true" />
4595                         <field name="missing" oils_persist:virtual="true" />
4596                         <field name="incomplete" oils_persist:virtual="true" />
4597                 </fields>
4598         </class>
4599
4600         <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">
4601                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4602                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4603                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4604                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4605                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4606                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4607                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4608                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4609                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4610                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4611                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4612                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4613                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4614                 </fields>
4615                 <links>
4616                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4617                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4618                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4619                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4620                 </links>
4621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4622                         <actions>
4623                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4624                                 <retrieve/>
4625                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4626                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4627                         </actions>
4628                 </permacrud>
4629         </class>
4630
4631         <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">
4632                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4633                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4634                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4635                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4636                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4637                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4638                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4639                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4640                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4641                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4642                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4643                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4644                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4645                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4646                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4647                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4648                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4649                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4650                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4651                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4652                 </fields>
4653                 <links>
4654                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4655                 </links>
4656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4657                         <actions>
4658                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4659                                         <context link="subscription" field="owning_lib" />
4660                                 </create>
4661                                 <retrieve />
4662                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4663                                         <context link="subscription" field="owning_lib" />
4664                                 </update>
4665                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4666                                         <context link="subscription" field="owning_lib" />
4667                                 </delete>
4668                         </actions>
4669                 </permacrud>
4670         </class>
4671
4672         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4673                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4674                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4675                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4676                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4677                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4678                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4679                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4680                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4681                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4682                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4683                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4684                 </fields>
4685                 <links>
4686                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4687                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4688                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4689                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4690                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4691                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4692                 </links>
4693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4694                         <actions>
4695                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4696                                 <retrieve />
4697                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4698                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4699                         </actions>
4700                 </permacrud>
4701         </class>
4702
4703         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4704                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4705                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4706                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4707                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4708                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4709                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4710                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4711                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4712                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4713                 </fields>
4714                 <links>
4715                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4716                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4717                 </links>
4718         </class>
4719
4720         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4722                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4723                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4724                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4725                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4726                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4727                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4728                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4729                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4730                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4731                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4732                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4733                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4734                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4735                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4736                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4737                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4738                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4739                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4740                 </fields>
4741                 <links>
4742                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4743                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4744                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4745                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4746                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4747                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4748                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4749                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4750                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4751                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4752                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4753                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4754                 </links>
4755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4756                         <actions>
4757                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4758                                 <retrieve />
4759                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4760                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4761                         </actions>
4762                 </permacrud>
4763         </class>
4764
4765         <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">
4766                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4768                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4769                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4770                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4771                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4772                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4773                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4774                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4775                 </fields>
4776                 <links>
4777                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4778                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4779                 </links>
4780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4781                         <actions>
4782                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4783                                         <context link="distribution" field="holding_lib" />
4784                                 </create>
4785                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4786                                         <context link="distribution" field="holding_lib" />
4787                                 </retrieve>
4788                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4789                                         <context link="distribution" field="holding_lib" />
4790                                 </update>
4791                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4792                                         <context link="distribution" field="holding_lib" />
4793                                 </delete>
4794                         </actions>
4795                 </permacrud>
4796         </class>
4797
4798         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4800                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4801                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4802                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4803                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4804                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4805                 </fields>
4806                 <links>
4807                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4808                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4809                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4810                 </links>
4811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4812                         <actions>
4813                                 <create permission="ADMIN_SERIAL_STREAM">
4814                                         <context link="distribution" field="holding_lib" />
4815                                 </create>
4816                                 <retrieve />
4817                                 <update permission="ADMIN_SERIAL_STREAM">
4818                                         <context link="distribution" field="holding_lib" />
4819                                 </update>
4820                                 <delete permission="ADMIN_SERIAL_STREAM">
4821                                         <context link="distribution" field="holding_lib" />
4822                                 </delete>
4823                         </actions>
4824                 </permacrud>
4825         </class>
4826
4827         <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">
4828                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4829                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4830                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4831                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4832                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4833                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4834                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4835                 </fields>
4836                 <links>
4837                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4838                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4839                 </links>
4840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4841                         <actions>
4842                                 <create permission="ADMIN_SERIAL_STREAM">
4843                                         <context link="stream" jump="distribution" field="holding_lib" />
4844                                 </create>
4845                                 <retrieve permission="RECEIVE_SERIAL">
4846                                         <context link="stream" jump="distribution" field="holding_lib" />
4847                                 </retrieve>
4848                                 <update permission="ADMIN_SERIAL_STREAM">
4849                                         <context link="stream" jump="distribution" field="holding_lib" />
4850                                 </update>
4851                                 <delete permission="ADMIN_SERIAL_STREAM">
4852                                         <context link="stream" jump="distribution" field="holding_lib" />
4853                                 </delete>
4854                         </actions>
4855                 </permacrud>
4856         </class>
4857
4858         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4859                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4860                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4861                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4862                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4863                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4864                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4865                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4866                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4867                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4868                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4869                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4870                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4871                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4872                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4873                 </fields>
4874                 <links>
4875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4876                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4877                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4878                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4879                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4880                 </links>
4881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4882                         <actions>
4883                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4884                                         <context link="subscription" field="owning_lib" />
4885                                 </create>
4886                                 <retrieve/>
4887                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4888                                         <context link="subscription" field="owning_lib" />
4889                                 </update>
4890                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4891                                         <context link="subscription" field="owning_lib" />
4892                                 </delete>
4893                         </actions>
4894                 </permacrud>
4895         </class>
4896
4897         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4898                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4899                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4900                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4901                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4902                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4903                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4904                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4905                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4906                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4907                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4908                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4909                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4910                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4911                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4912                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4913                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4914                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4915                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4916                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4917                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4918                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4919                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4920                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4921                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4922                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4923                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4924                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4925                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4926                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4927                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4928                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4929                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4930                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4931                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4932                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4933                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4934                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4935                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4938                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4941                 </fields>
4942                 <links>
4943                         <link field="age_protect" reltype="might_have" key="id" map="" class="crahp"/>
4944                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4945                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4946                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4947                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4948                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4949                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4951                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4952                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4953                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4954                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4955                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4956                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4957                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4958                 </links>
4959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4960                         <actions>
4961                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4962                                 <retrieve/>
4963                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4964                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4965                         </actions>
4966                 </permacrud>
4967         </class>
4968
4969         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4970                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4971                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4972                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4973                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4974                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4975                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4976                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4977                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4978                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4979                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4980                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4981                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4983                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4984                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4985                 </fields>
4986                 <links>
4987                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4988                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4989                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4990                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4991                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4992                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4993                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4994                 </links>
4995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4996                         <actions>
4997                                 <create permission="ADMIN_SERIAL_ITEM">
4998                                         <context link="stream" jump="distribution" field="holding_lib" />
4999                                 </create>
5000                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5001                                         <context link="stream" jump="distribution" field="holding_lib" />
5002                                 </retrieve>
5003                                 <update permission="ADMIN_SERIAL_ITEM">
5004                                         <context link="stream" jump="distribution" field="holding_lib" />
5005                                 </update>
5006                                 <delete permission="ADMIN_SERIAL_ITEM">
5007                                         <context link="stream" jump="distribution" field="holding_lib" />
5008                                 </delete>
5009                         </actions>
5010                 </permacrud>
5011         </class>
5012
5013         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5014                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5015                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5016                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5017                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5018                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5019                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5020                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5021                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5022                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5023                 </fields>
5024                 <links>
5025                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5026                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5027                 </links>
5028                 <!-- Not available via PCRUD at this time -->
5029         </class>
5030         <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">
5031                 <fields>
5032                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5033                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5034                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5035                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5036                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5037                 </fields>
5038                 <links>
5039                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5040                 </links>
5041         </class>
5042         <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">
5043                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5044                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5045                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5046                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5047                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5048                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5049                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5050                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5051                 </fields>
5052                 <links>
5053                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5054                 </links>
5055         </class>
5056         <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">
5057                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5058                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5059                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5060                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5061                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5062                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5063                 </fields>
5064                 <links>
5065                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5066                 </links>
5067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5068                         <actions>
5069                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5070                                         <context link="distribution" field="holding_lib" />
5071                                 </create>
5072                                 <retrieve/>
5073                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5074                                         <context link="distribution" field="holding_lib" />
5075                                 </update>
5076                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5077                                         <context link="distribution" field="holding_lib" />
5078                                 </delete>
5079                         </actions>
5080                 </permacrud>
5081         </class>
5082
5083         <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">
5084                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5085                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5086                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5087                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5088                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5089                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5090                 </fields>
5091                 <links>
5092                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5093                 </links>
5094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5095                         <actions>
5096                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5097                                         <context link="distribution" field="holding_lib" />
5098                                 </create>
5099                                 <retrieve/>
5100                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5101                                         <context link="distribution" field="holding_lib" />
5102                                 </update>
5103                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5104                                         <context link="distribution" field="holding_lib" />
5105                                 </delete>
5106                         </actions>
5107                 </permacrud>
5108         </class>
5109
5110         <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">
5111                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5112                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5113                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5114                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5115                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5116                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5117                 </fields>
5118                 <links>
5119                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5120                 </links>
5121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5122                         <actions>
5123                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5124                                         <context link="distribution" field="holding_lib" />
5125                                 </create>
5126                                 <retrieve/>
5127                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5128                                         <context link="distribution" field="holding_lib" />
5129                                 </update>
5130                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5131                                         <context link="distribution" field="holding_lib" />
5132                                 </delete>
5133                         </actions>
5134                 </permacrud>
5135         </class>
5136
5137         <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">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5139                         <field name="id" reporter:datatype="id" />
5140                         <field name="owning_copy" reporter:datatype="link"/>
5141                         <field name="stat_cat" reporter:datatype="link"/>
5142                         <field name="stat_cat_entry" reporter:datatype="link"/>
5143                 </fields>
5144                 <links>
5145                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5146                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5147                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5148                 </links>
5149         </class>
5150         <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">
5151                 <fields oils_persist:primary="code">
5152                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5153                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5154                 </fields>
5155                 <links/>
5156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5157             <actions>
5158                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5159                 <retrieve/>
5160                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5161                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5162             </actions>
5163         </permacrud>
5164         </class>
5165         <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">
5166                 <fields oils_persist:primary="code">
5167                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5168                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5169                 </fields>
5170                 <links/>
5171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5172             <actions>
5173                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5174                 <retrieve/>
5175                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5176                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5177             </actions>
5178         </permacrud>
5179         </class>
5180         <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">
5181                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5182                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5183                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5184                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5185                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5186                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5187                 </fields>
5188                 <links>
5189             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5190         </links>
5191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5192             <actions>
5193                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5194                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5195                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5196                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5197             </actions>
5198         </permacrud>
5199         </class>
5200         <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">
5201                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5202                         <field name="id" reporter:datatype="id" />
5203                         <field name="name" reporter:datatype="text"/>
5204                 </fields>
5205                 <links/>
5206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207             <actions>
5208                 <create permission="CREATE_LASSO" global_required="true"/>
5209                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5210                 <update permission="UPDATE_LASSO" global_required="true"/>
5211                 <delete permission="DELETE_LASSO" global_required="true"/>
5212             </actions>
5213         </permacrud>
5214         </class>
5215         <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">
5216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5217                         <field name="id" reporter:datatype="id" />
5218                         <field name="lasso" reporter:datatype="link"/>
5219                         <field name="org_unit" reporter:datatype="org_unit"/>
5220                 </fields>
5221                 <links>
5222                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5223                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5224                 </links>
5225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5226             <actions>
5227                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5228                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5229                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5230                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5231             </actions>
5232         </permacrud>
5233         </class>
5234         <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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5236                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5237                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5238                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5239                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5240                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5241                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5242                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5243                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5244                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5245                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5246                 </fields>
5247                 <links>
5248                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5249                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5250                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5251                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5252                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5253                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5254                 </links>
5255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5256             <actions>
5257                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5258                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5259                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5260                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5261             </actions>
5262         </permacrud>
5263         </class>
5264         <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">
5265                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5266                         <field name="id" reporter:datatype="id" />
5267                         <field name="from_org" reporter:datatype="org_unit"/>
5268                         <field name="to_org" reporter:datatype="org_unit"/>
5269                         <field name="prox" reporter:datatype="int" />
5270                 </fields>
5271                 <links>
5272                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5273                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5274                 </links>
5275         </class>
5276         <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">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5278                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5279                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5280                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5281                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5282                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5283                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5284                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5285                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5286                 </fields>
5287                 <links/>
5288         </class>
5289         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5291                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5292                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5293                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5294                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5295                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5296                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5297                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5298                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5299                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5300                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5301                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5302                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5303                 </fields>
5304                 <links>
5305                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5306                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5307                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5308                 </links>
5309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5310             <actions>
5311                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5312                 <retrieve/>
5313                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5314                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5315             </actions>
5316         </permacrud>
5317         </class>
5318         <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">
5319                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5320                         <field name="address_type"  reporter:datatype="text"/>
5321                         <field name="city"  reporter:datatype="text"/>
5322                         <field name="country"  reporter:datatype="text"/>
5323                         <field name="county"  reporter:datatype="text"/>
5324                         <field name="id" reporter:datatype="id" />
5325                         <field name="org_unit" reporter:datatype="org_unit"/>
5326                         <field name="post_code"  reporter:datatype="text"/>
5327                         <field name="state"  reporter:datatype="text"/>
5328                         <field name="street1"  reporter:datatype="text"/>
5329                         <field name="street2"  reporter:datatype="text"/>
5330                         <field name="valid" reporter:datatype="bool"/>
5331                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5332                 </fields>
5333                 <links>
5334                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5335                 </links>
5336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5337             <actions>
5338                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5339                 <retrieve/>
5340                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5341                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5342             </actions>
5343         </permacrud>
5344         </class>
5345         <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">
5346                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5347                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5348                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5349                         <field name="query_text" reporter:datatype="text"/>
5350                 </fields>
5351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5352             <actions>
5353                 <retrieve/>
5354             </actions>
5355         </permacrud>
5356         </class>
5357
5358         <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">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5360                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5361                         <field name="owner" reporter:datatype="org_unit"/>
5362                         <field name="code" reporter:datatype="text"/>
5363                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5364                         <field name="create_date" reporter:datatype="timestamp"/>
5365                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5366                 </fields>
5367                 <links>
5368                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5369                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5370                 </links>
5371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5372             <actions>
5373                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5374                 <retrieve/>
5375                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5376                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5377             </actions>
5378         </permacrud>
5379         </class>
5380         <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">
5381                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5382                         <field name="id" reporter:datatype="id"/>
5383                         <field name="grp" reporter:datatype="link"/>
5384                         <field name="pos" reporter:datatype="int"/>
5385                         <field name="query" reporter:datatype="link"/>
5386                 </fields>
5387                 <links>
5388                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5389                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5390                 </links>
5391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5392             <actions>
5393                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5394                     <context link="grp" field="owner"/>
5395                 </create>
5396                 <retrieve/>
5397                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5398                     <context link="grp" field="owner"/>
5399                 </update>
5400                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5401                     <context link="grp" field="owner"/>
5402                 </delete>
5403             </actions>
5404         </permacrud>
5405         </class>
5406
5407         <!-- A note: Please update alhr and ahopl when updating ahr -->
5408         <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">
5409                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5410                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5411                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5412                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5413                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5414                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5415                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5416                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5417                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5418                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5419                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5420                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5421                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5422                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5423                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5424                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5425                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5426                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5427                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5428                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5429                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5430                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5431                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5432                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5433                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5434                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5435                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5436                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5437                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5438                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5439                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5440                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5441                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5442                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5443                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5444                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5445                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5446                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5447                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5448                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5449                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5450                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5451                 </fields>
5452                 <links>
5453                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5454                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5455                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5456                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5457                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5458                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5459                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5460                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5461                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5462                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5463                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5464                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5465                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5466                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5467                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5468                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5469                 </links>
5470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5471                         <actions>
5472                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5473                         </actions>
5474                 </permacrud>
5475         </class>
5476         <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">
5477                 <oils_persist:source_definition><![CDATA[
5478                 SELECT
5479                         ahr.*,
5480                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5481                                 copy_location_order_position,
5482                         CASE WHEN au.alias IS NOT NULL THEN
5483                                 au.alias
5484                         ELSE
5485                                 au.first_given_name
5486                         END AS usr_alias_or_first_given_name,
5487                         au.first_given_name AS usr_first_given_name,
5488                         au.second_given_name AS usr_second_given_name,
5489                         au.family_name AS usr_family_name,
5490                         au.prefix AS usr_prefix,
5491                         au.suffix AS usr_suffix,
5492                         au.alias AS usr_alias,
5493                         CASE WHEN au.alias IS NOT NULL THEN
5494                                 au.alias
5495                         ELSE
5496                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5497                                         COALESCE(au.family_name, ''),
5498                                         COALESCE(au.suffix, ''),
5499                                         ', ',
5500                                         COALESCE(au.prefix, ''),
5501                                         COALESCE(au.first_given_name, ''),
5502                                         COALESCE(au.second_given_name, '')
5503                                 ], ' '), E'\\s+,', ',')
5504                         END AS usr_alias_or_display_name,
5505                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5506                                 COALESCE(au.family_name, ''),
5507                                 COALESCE(au.suffix, ''),
5508                                 ', ',
5509                                 COALESCE(au.prefix, ''),
5510                                 COALESCE(au.first_given_name, ''),
5511                                 COALESCE(au.second_given_name, '')
5512                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5513                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5514                                 AS call_number_label,
5515                         siss.label AS issuance_label,
5516                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5517                         ahcm_1.copy_count AS potential_copies
5518                 FROM action.hold_request ahr
5519                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5520                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5521                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5522                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5523                 JOIN actor.usr au ON (au.id = ahr.usr)
5524                 JOIN (
5525                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5526                         FROM asset.copy_location
5527                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5528                 LEFT JOIN actor.usr_standing_penalty ausp 
5529                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5530                 LEFT JOIN config.standing_penalty csp
5531                         ON (
5532                                 csp.id = ausp.standing_penalty AND 
5533                                 csp.block_list LIKE '%CAPTURE%' AND (
5534                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5535                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5536                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5537                                         )
5538                                 )
5539                         )
5540                 JOIN (
5541                         SELECT COUNT(target_copy) AS copy_count, hold
5542                         FROM action.hold_copy_map
5543                         GROUP BY 2
5544                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5545                 LEFT JOIN serial.issuance siss
5546                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5547                 LEFT JOIN asset.copy_location_order acplo
5548                         ON (acp.location = acplo.location AND
5549                                 acp.circ_lib = acplo.org)
5550                 WHERE
5551                         ahr.capture_time IS NULL AND
5552                         ahr.cancel_time IS NULL AND
5553                         csp.id IS NULL AND
5554                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5555                         acp.status IN (0,7)
5556                 ]]></oils_persist:source_definition>
5557                 <fields oils_persist:primary="id">
5558                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5559                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5560                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5561                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5562                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5563                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5564                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5565                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5566                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5567                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5568                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5569                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5570                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5571                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5572                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5573                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5574                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5575                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5576                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5577                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5578                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5579                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5580                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5581                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5582                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5583                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5584                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5585                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5586                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5587                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5588                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5589                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5590                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5591                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5592                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5593                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5594                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5595                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5596                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5597                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5598                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5599                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5600                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5601                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5602                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5603                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5604                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5605                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5606                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5607                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5608                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5609                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5610                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5611                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5612                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5613                 </fields>
5614                 <links>
5615                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5616                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5617                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5618                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5619                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5620                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5621                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5622                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5623                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5624                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5625                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5626                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5627                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5628                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5629                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5630                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5631                 </links>
5632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5633                         <actions>
5634                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5635                         </actions>
5636                 </permacrud>
5637         </class>
5638         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5639                 <oils_persist:source_definition>
5640                         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)
5641                 </oils_persist:source_definition>
5642                 <fields oils_persist:primary="id">
5643                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5644                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5645                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5646                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5647                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5648                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5649                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5650                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5651                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5652                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5653                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5654                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5655                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5656                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5657                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5658                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5659                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5660                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5661                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5662                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5663                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5664                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5665                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5667                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5668                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5669                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5670                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5671                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5672                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5673                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5674                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5675                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5676                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5677                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5678                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5679                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5680                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5681                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5682                 </fields>
5683                 <links>
5684                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5685                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5686                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5687                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5688                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5689                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5690                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5691                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5692                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5693                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5694                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5695                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5696                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5697                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5698                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5699                 </links>
5700         </class>
5701
5702         <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">
5703                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5704                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5705                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5706                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5707                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5708                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5709                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5710                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5711                 </fields>
5712                 <links>
5713                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5714                 </links>
5715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5716                         <actions>
5717                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5718                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5719                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5720                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5721                         </actions>
5722                 </permacrud>
5723         </class>
5724         <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">
5725                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5726                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5727                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5728                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5729                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5730                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5731                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5732                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5733                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5734                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5735                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5736                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5737                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5738                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5739                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5740                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5741                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5742                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5743                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5744                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5745                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5746                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5747                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5748                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5749                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5750                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5751                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5752                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5753                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5754                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5755                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5757                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5758                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5759                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5760                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5761                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5762                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5763                 </fields>
5764                 <links>
5765                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5766                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5767                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5768                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5769                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5770                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5771                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5772                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5773                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5774                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5775                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5776                 </links>
5777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5778                         <actions>
5779                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5780                         </actions>
5781                 </permacrud>
5782         </class>
5783         <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">
5784                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5785                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5786                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5787                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5788                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5789                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5790                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5791                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5792                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5793                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5794                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5795                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5796                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5797                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5798                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5799                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5800                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5801                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5802                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5803                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5804                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5805                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5806                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5807                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5808                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5809                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5810                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5811                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5813                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5814                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5815                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5816                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5817                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5818                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5819                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5820                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5821                 </fields>
5822                 <links>
5823                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5824                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5825                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5826                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5827                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5828                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5829                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5830                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5831                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5832                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5833                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5834                 </links>
5835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5836                         <actions>
5837                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5838                         </actions>
5839                 </permacrud>
5840         </class>
5841
5842         <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">
5843                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5844                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5845                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5846                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5847                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5848                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5849                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5850                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5851                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5852                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5853                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5854                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5855                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5856                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5857                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5858                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5859                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5860                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5861                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5862                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5863                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5864                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5865                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5866                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5867                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5868                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5869                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5870                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5871                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5872                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5873                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5874                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5875                 </fields>
5876                 <links>
5877                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5878                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5879                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5880                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5881                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5882                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5883                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5884                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5885                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5886                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5887                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5888                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5889                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5890                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5891                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5892                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5893                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5894                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5895                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5896                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5897                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5898                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5899                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5900                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5901                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5902                 </links>
5903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5904             <actions>
5905                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5906                 <retrieve />
5907                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5908                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5909             </actions>
5910         </permacrud>
5911         </class>
5912         <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">
5913                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5914                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5915                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5916                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5917                 </fields>
5918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5919                         <actions>
5920                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5921                                 <retrieve/>
5922                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5923                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5924                         </actions>
5925                 </permacrud>
5926         </class>
5927         <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">
5928                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5929                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5930                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5931                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5932                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5933                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5934                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5935                 </fields>
5936                 <links>
5937                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5938                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5939                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5940                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5941                 </links>
5942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5943                         <actions>
5944                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5945                                 <retrieve/>
5946                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5947                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5948                         </actions>
5949                 </permacrud>
5950         </class>
5951         <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">
5952                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5953                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5954                         <field name="btype" reporter:datatype="text"/>
5955                         <field name="id" reporter:datatype="id" />
5956                         <field name="name"  reporter:datatype="text"/>
5957                         <field name="description" reporter:datatype="text"/>
5958                         <field name="owner" reporter:datatype="link"/>
5959                         <field name="pub" reporter:datatype="bool"/>
5960                         <field name="create_time" reporter:datatype="timestamp" />
5961                 </fields>
5962                 <links>
5963                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5964                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5965                 </links>
5966         </class>
5967         <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">
5968                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5969                         <field name="id" reporter:datatype="id" />
5970                         <field name="bucket" reporter:datatype="link"/>
5971                         <field name="note" reporter:datatype="text" />
5972                 </fields>
5973                 <links>
5974                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5975                 </links>
5976         </class>
5977         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5979                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5980                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5981                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5982                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5983                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5984                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5985                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5986                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5987                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5988                 </fields>
5989                 <links>
5990                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5991                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5992                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5993                 </links>
5994         </class>
5995         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5997                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5998                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5999                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6000                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6001                 </fields>
6002                 <links>
6003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6004                 </links>
6005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6006                         <actions>
6007                                 <retrieve permission="VIEW_USER">
6008                                         <context link="usr" field="home_ou" />
6009                                 </retrieve>
6010                         </actions>
6011                 </permacrud>
6012         </class>
6013     <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">
6014         <fields oils_persist:primary="field">
6015             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6016             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6017             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6018         </fields>
6019         <links/>
6020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6021             <actions>
6022                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6023                 <retrieve />
6024                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6025                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6026             </actions>
6027         </permacrud>
6028     </class>
6029         <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">
6030                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6031                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6032                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6033                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6034                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6035                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6036                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6037                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6038                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6039                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6040                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6041                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6042                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6043                 </fields>
6044                 <links>
6045                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6046                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6047                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6048                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6049                 </links>
6050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6051             <actions>
6052                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6053                 <retrieve />
6054                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6055                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6056             </actions>
6057         </permacrud>
6058         </class>
6059         <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">
6060                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6061                         <field name="field" reporter:datatype="link"/>
6062                         <field name="id" reporter:datatype="id" />
6063                         <field name="source" reporter:datatype="link"/>
6064                         <field name="value"  reporter:datatype="text"/>
6065                 </fields>
6066                 <links>
6067                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6068                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6069                 </links>
6070         </class>
6071         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6072                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6073                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6074                         <field name="btype" reporter:datatype="text"/>
6075                         <field name="id" reporter:datatype="id" />
6076                         <field name="name"  reporter:datatype="text"/>
6077                         <field name="description" reporter:datatype="text"/>
6078                         <field name="owner" reporter:datatype="link"/>
6079                         <field name="pub" reporter:datatype="bool"/>
6080                         <field name="create_time" reporter:datatype="timestamp" />
6081                 </fields>
6082                 <links>
6083                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6084                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6085                 </links>
6086         </class>
6087         <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">
6088                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6089                         <field name="id" reporter:datatype="id" />
6090                         <field name="bucket" reporter:datatype="link"/>
6091                         <field name="note" reporter:datatype="text" />
6092                 </fields>
6093                 <links>
6094                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6095                 </links>
6096         </class>
6097         <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">
6098                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6099                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6100                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6101                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6102                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6103                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6104                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6105                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6106                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6107                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6108                 </fields>
6109                 <links>
6110                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6111                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6112                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6113                 </links>
6114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6115             <actions>
6116                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6117                     <context link="xact" jump="usr" field="home_ou"/>
6118                 </retrieve>
6119                         </actions>
6120                 </permacrud>
6121         </class>
6122         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6123                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6124                         <field name="id" reporter:datatype="id" />
6125                         <field name="ind1" />
6126                         <field name="ind2" />
6127                         <field name="record" />
6128                         <field name="subfield" />
6129                         <field name="tag" />
6130                         <field name="value" />
6131                 </fields>
6132                 <links>
6133                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6134                 </links>
6135         </class>
6136         <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">
6137                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6138                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6139                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6140                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6141                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6142                 </fields>
6143                 <links>
6144                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6145                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6146                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6147                 </links>
6148         </class>
6149         <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">
6150                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6151                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6152                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6153                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6154                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6155                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6156                 </fields>
6157                 <links>
6158                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6159                 </links>
6160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6161             <actions>
6162                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6163                 <retrieve/>
6164                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6165                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6166             </actions>
6167         </permacrud>
6168
6169         </class>
6170         <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">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6172                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6173                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6174                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6175                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6176                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6177                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6178                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6179                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6180                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6181                 </fields>
6182                 <links>
6183                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6184                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6185                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6186                 </links>
6187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6188             <actions>
6189                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6190                 <retrieve/>
6191                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6192                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6193             </actions>
6194         </permacrud>
6195         </class>
6196         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6197                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6198                         <field name="create_date" reporter:datatype="timestamp"/>
6199                         <field name="creator" reporter:datatype="link"/>
6200                         <field name="edit_date" reporter:datatype="timestamp"/>
6201                         <field name="editor" reporter:datatype="link"/>
6202                         <field name="id" reporter:datatype="id" />
6203                         <field name="pub" reporter:datatype="bool"/>
6204                         <field name="record" reporter:datatype="link"/>
6205                         <field name="value"  reporter:datatype="text"/>
6206                 </fields>
6207                 <links>
6208                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6209                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6210                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6211                 </links>
6212         </class>
6213         <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">
6214                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6215                         <field name="balance_owed" reporter:datatype="money" />
6216                         <field name="total_owed" reporter:datatype="money" />
6217                         <field name="total_paid" reporter:datatype="money" />
6218                         <field name="usr" reporter:datatype="link"/>
6219                 </fields>
6220                 <links>
6221                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6222                 </links>
6223         </class>
6224         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6225                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6226                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6227                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6228                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6229                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6230                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6231                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6232                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6233                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6234                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6235                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6236                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6237                 </fields>
6238                 <links>
6239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6240                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6241                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6242                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6244                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6245                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6246                 </links>
6247         </class>
6248         <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">
6249                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6250                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6251                         <field name="quality" reporter:datatype="int" />
6252                         <field name="source" reporter:datatype="text"/>
6253                         <field name="transcendant" reporter:datatype="bool"/>
6254                         <field name="can_have_copies" reporter:datatype="bool"/>
6255                 </fields>
6256                 <links/>
6257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6258             <actions>
6259                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6260                 <retrieve/>
6261                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6262                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6263             </actions>
6264         </permacrud>
6265         </class>
6266         <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">
6267                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6268                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6269                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6270                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6271                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6272                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6273                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6274                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6275                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6276                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6277                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6278                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6279                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6280                 </fields>
6281                 <links>
6282                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6283                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6284                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6285                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6286                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6287                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6288                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6289                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6290                 </links>
6291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6292                         <actions>
6293                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6294                                         <context link="usr" field="home_ou" />
6295                                 </retrieve>
6296                         </actions>
6297                 </permacrud>
6298         </class>
6299         <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">
6300                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6301                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6302                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6303                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6304                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6305                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6306                 </fields>
6307                 <links>
6308                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6310                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6311                 </links>
6312         </class>
6313         <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">
6314                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6315                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6316                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6317                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6318                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6319                 </fields>
6320                 <links>
6321                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6322                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6323                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6324                 </links>
6325         </class>
6326         <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">
6327                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6328                         <field name="bucket" reporter:datatype="link"/>
6329                         <field name="id" reporter:datatype="id" />
6330                         <field name="target_user" reporter:datatype="link"/>
6331                         <field name="create_time" reporter:datatype="timestamp" />
6332                         <field name="pos" reporter:datatype="int" />
6333                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6334                 </fields>
6335                 <links>
6336                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6337                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6338             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6339                 </links>
6340         </class>
6341         <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">
6342                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6343                         <field name="id" reporter:datatype="id" />
6344                         <field name="item" reporter:datatype="link"/>
6345                         <field name="note" reporter:datatype="text" />
6346                 </fields>
6347                 <links>
6348                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6349                 </links>
6350         </class>
6351         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6352                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6353                         <field name="balance_owed" reporter:datatype="money" />
6354                         <field name="total_owed" reporter:datatype="money" />
6355                         <field name="total_paid" reporter:datatype="money" />
6356                         <field name="usr" reporter:datatype="link"/>
6357                 </fields>
6358                 <links>
6359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6360                 </links>
6361         </class>
6362         <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">
6363                 <fields oils_persist:primary="code" oils_persist:sequence="">
6364                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6365                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6366                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6367                 </fields>
6368                 <links/>
6369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6370             <actions>
6371                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6372                 <retrieve/>
6373                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6374                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6375             </actions>
6376         </permacrud>
6377         </class>
6378         <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">
6379                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6380                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6381                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6382                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6383                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6384                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6385                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6386                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6387                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6388                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6389                 </fields>
6390                 <links>
6391                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6392                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6393                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6394                 </links>
6395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6396             <actions>
6397                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6398                     <context link="xact" jump="usr" field="home_ou"/>
6399                 </retrieve>
6400                         </actions>
6401                 </permacrud>
6402         </class>
6403         <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">
6404                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6405                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6406                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6407                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6408                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6409                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6410                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6412                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6413                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6414                 </fields>
6415                 <links>
6416                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6417                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6418                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6419                 </links>
6420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6421             <actions>
6422                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6423                     <context link="xact" jump="usr" field="home_ou"/>
6424                 </retrieve>
6425                         </actions>
6426                 </permacrud>
6427         </class>
6428         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6429                 <fields oils_persist:primary="id" oils_persist:sequence="">
6430                         <field name="checkin_lib" reporter:datatype="link"/>
6431                         <field name="checkin_staff" reporter:datatype="link"/>
6432                         <field name="checkin_time" reporter:datatype="timestamp"/>
6433                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6434                         <field name="circ_staff" reporter:datatype="link"/>
6435                         <field name="desk_renewal" reporter:datatype="bool"/>
6436                         <field name="due_date" reporter:datatype="timestamp"/>
6437                         <field name="duration" reporter:datatype="interval"/>
6438                         <field name="duration_rule" reporter:datatype="link"/>
6439                         <field name="fine_interval" reporter:datatype="interval"/>
6440                         <field name="id" reporter:datatype="id" />
6441                         <field name="max_fine" reporter:datatype="money" />
6442                         <field name="max_fine_rule" reporter:datatype="link"/>
6443                         <field name="opac_renewal" reporter:datatype="bool"/>
6444                         <field name="phone_renewal" reporter:datatype="bool"/>
6445                         <field name="recurring_fine" reporter:datatype="money" />
6446                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6447                         <field name="renewal_remaining" reporter:datatype="int" />
6448             <field name="grace_period" reporter:datatype="interval" />
6449                         <field name="stop_fines" reporter:datatype="text"/>
6450                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6451                         <field name="target_copy" reporter:datatype="link"/>
6452                         <field name="usr" reporter:datatype="link"/>
6453                         <field name="xact_finish" reporter:datatype="timestamp" />
6454                         <field name="xact_start" reporter:datatype="timestamp" />
6455                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6456                 </fields>
6457                 <links>
6458                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6459                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6460                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6461                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6462                 </links>
6463         </class>
6464         <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">
6465                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6466                         <field name="field" reporter:datatype="link"/>
6467                         <field name="id" reporter:datatype="id" />
6468                         <field name="source" reporter:datatype="link"/>
6469                         <field name="value" reporter:datatype="text"/>
6470                 </fields>
6471                 <links>
6472                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6473                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6474                 </links>
6475         </class>
6476         <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">
6477                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6478                         <field name="high" reporter:datatype="money" />
6479                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6480                         <field name="low" reporter:datatype="money" />
6481                         <field name="name" reporter:datatype="text"/>
6482                         <field name="normal" reporter:datatype="money" />
6483                         <field name="recurrence_interval" reporter:datatype="interval"/>
6484             <field name="grace_period" reporter:datatype="interval" />
6485                 </fields>
6486                 <links/>
6487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6488             <actions>
6489                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6490                 <retrieve/>
6491                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6492                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6493             </actions>
6494         </permacrud>
6495         </class>
6496         <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">
6497                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6498                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6499                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6500                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6501                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6502                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6503                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6504                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6505                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6506                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6507                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6508                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6509                 </fields>
6510                 <links>
6511                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6512                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6513                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6514                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6515                 </links>
6516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6517             <actions>
6518                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6519                     <context link="xact" jump="usr" field="home_ou"/>
6520                 </retrieve>
6521                         </actions>
6522                 </permacrud>
6523         </class>
6524         <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">
6525                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6526                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6527                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6528                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6529                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6530                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6531                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6532                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6533                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6534                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6535                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6536                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6537                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6538                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6539                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6540                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6541                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6542                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6543                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6544                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6545                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6546                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6547                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6548                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6549                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6550                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6551                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6552                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6553                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6554                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6555                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6556                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6557                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6558                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6559                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6560                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6561                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6562                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6563                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6564                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6565                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6566                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6567                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6568                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6569                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6570                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6571                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6572                 </fields>
6573                 <links>
6574                         <link field="age_protect" reltype="might_have" key="id" map="" class="crahp"/>
6575                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6576                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6577                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6578                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6579                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6580                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6581                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6582                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6583                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6584                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6585                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6586                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6587                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6588                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6589                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6590                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6591                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6592                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6593                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6594                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6595                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6596                 </links>
6597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6598             <actions>
6599                 <create permission="CREATE_COPY">
6600                     <context link="call_number" field="owning_lib"/>
6601                 </create>
6602                 <retrieve/>
6603                 <update permission="UPDATE_COPY">
6604                     <context link="call_number" field="owning_lib"/>
6605                 </update>
6606                 <delete permission="DELETE_COPY">
6607                     <context link="call_number" field="owning_lib"/>
6608                 </delete>
6609             </actions>
6610         </permacrud>
6611         </class>
6612
6613         <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">
6614                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6615                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6616                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6617                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6618                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6619                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6620                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6621                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6622                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6623                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6624                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6625                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6626                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6627                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6628                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6629                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6630                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6631                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6632                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6633                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6634                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6635                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6636                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6637                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6638                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6639                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6640                 </fields>
6641                 <links>
6642                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6644                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6645                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6646                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6647                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6648                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6649                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6650                 </links>
6651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6652                         <actions>
6653                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6654                                 <retrieve />
6655                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6656                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6657                         </actions>
6658                 </permacrud>
6659         </class>
6660
6661         <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">
6662                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6663                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6664                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6665                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6666                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6667                 </fields>
6668                 <links/>
6669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6670             <actions>
6671                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6672                 <retrieve/>
6673                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6674                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6675             </actions>
6676         </permacrud>
6677         </class>
6678         <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">
6679                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6680                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6681                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6682                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6683                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6684                 </fields>
6685                 <links/>
6686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6687             <actions>
6688                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6689                 <retrieve/>
6690                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6691                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6692             </actions>
6693         </permacrud>
6694         </class>
6695         <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">
6696                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6697                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6698                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6699                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6700                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6701                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6702                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6703                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6704                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6705                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6706                 </fields>
6707                 <links>
6708                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6709                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6710                 </links>
6711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6712             <actions>
6713                 <create permission="CREATE_PERM" global_required="true"/>
6714                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6715                 <update permission="UPDATE_PERM" global_required="true"/>
6716                 <delete permission="DELETE_PERM" global_required="true"/>
6717             </actions>
6718         </permacrud>
6719         </class>
6720         <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">
6721                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6722                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6723                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6724                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6725                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6726                 </fields>
6727                 <links>
6728                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6729                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6730                 </links>
6731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732             <actions>
6733                 <create permission="ADMIN_SURVEY">
6734                     <context link="question" jump="survey" field="owner"/>
6735                 </create>
6736                 <retrieve/>
6737                 <update permission="ADMIN_SURVEY">
6738                     <context link="question" jump="survey" field="owner"/>
6739                 </update>
6740                 <delete permission="ADMIN_SURVEY">
6741                     <context link="question" jump="survey" field="owner"/>
6742                 </delete>
6743             </actions>
6744         </permacrud>
6745         </class>
6746         <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">
6747                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6748                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6749                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6750                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6751                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6752                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6753                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6754                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6755                 </fields>
6756                 <links>
6757                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6758                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6759                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6760                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6761                 </links>
6762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6763                         <actions>
6764                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6765                         </actions>
6766                 </permacrud>
6767         </class>
6768         <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">
6769                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6770                         <field name="balance_owed" reporter:datatype="money" />
6771                         <field name="total_owed" reporter:datatype="money" />
6772                         <field name="total_paid" reporter:datatype="money" />
6773                         <field name="usr" reporter:datatype="link"/>
6774                 </fields>
6775                 <links>
6776                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6777                 </links>
6778         </class>
6779         <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">
6780                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6781                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6782                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6783                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6784                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6785                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6786                 </fields>
6787                 <links>
6788                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6789                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6790                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6791                 </links>
6792         </class>
6793         <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">
6794                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6795                         <field name="field" reporter:datatype="link"/>
6796                         <field name="id" reporter:datatype="id" />
6797                         <field name="source" reporter:datatype="link"/>
6798                         <field name="value" reporter:datatype="text"/>
6799                 </fields>
6800                 <links>
6801                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6802                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6803                 </links>
6804         </class>
6805         <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">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6807                         <field name="field" reporter:datatype="link"/>
6808                         <field name="id" reporter:datatype="id" />
6809                         <field name="source" reporter:datatype="link"/>
6810                         <field name="value" reporter:datatype="text"/>
6811                 </fields>
6812                 <links>
6813                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6814                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6815                 </links>
6816         </class>
6817         <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">
6818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6819                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6820                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6821                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6822                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6823                 </fields>
6824                 <links>
6825                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6826                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6827                 </links>
6828         </class>
6829         <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">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6831                         <field name="depth" reporter:datatype="int" />
6832                         <field name="grantable" reporter:datatype="bool"/>
6833                         <field name="grp" reporter:datatype="link"/>
6834                         <field name="id" reporter:datatype="id" />
6835                         <field name="perm" reporter:datatype="link"/>
6836                 </fields>
6837                 <links>
6838                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6839                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6840                 </links>
6841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6842             <actions>
6843                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6844                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6845                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6846                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6847             </actions>
6848         </permacrud>
6849         </class>
6850         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6851                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6852                         <field name="items" oils_persist:virtual="true" />
6853                         <field name="btype" reporter:datatype="text"/>
6854                         <field name="id" reporter:datatype="id" />
6855                         <field name="name" reporter:datatype="text"/>
6856                         <field name="description" reporter:datatype="text"/>
6857                         <field name="owner" reporter:datatype="link"/>
6858                         <field name="pub" reporter:datatype="bool"/>
6859                         <field name="create_time" reporter:datatype="timestamp" />
6860                 </fields>
6861                 <links>
6862                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6863                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6864                 </links>
6865         </class>
6866         <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">
6867                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6868                         <field name="id" reporter:datatype="id" />
6869                         <field name="bucket" reporter:datatype="link"/>
6870                         <field name="note" reporter:datatype="text" />
6871                 </fields>
6872                 <links>
6873                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6874                 </links>
6875         </class>
6876         <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">
6877                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6878                         <field name="id" reporter:datatype="int" />
6879                         <field name="usr" reporter:datatype="link"/>
6880                         <field name="work_ou" reporter:datatype="link"/>
6881                 </fields>
6882                 <links>
6883                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6884                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6885                 </links>
6886         </class>
6887         <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">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6889                         <field name="depth" reporter:datatype="int"/>
6890                         <field name="grantable" reporter:datatype="bool"/>
6891                         <field name="id" reporter:datatype="id" />
6892                         <field name="perm" reporter:datatype="link"/>
6893                         <field name="usr" reporter:datatype="link"/>
6894                 </fields>
6895                 <links>
6896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6897                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6898                 </links>
6899         </class>
6900         <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">
6901                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6902                         <field name="object_id" reporter:datatype="text"/>
6903                         <field name="grantable" reporter:datatype="bool"/>
6904                         <field name="id" reporter:datatype="id" />
6905                         <field name="perm" reporter:datatype="link"/>
6906                         <field name="usr" reporter:datatype="link"/>
6907                         <field name="object_type" reporter:datatype="text"/>
6908                 </fields>
6909                 <links>
6910                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6911                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6912                 </links>
6913         </class>
6914         <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">
6915                 <fields oils_persist:primary="id" oils_persist:sequence="">
6916                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6917                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6918                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6919                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6920                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6921                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6922                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6923                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6924                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6925                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6926                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6927                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6928                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6929                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6930                 </fields>
6931                 <links>
6932                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6933                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6934                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6935                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6936                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6937                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6938                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6939                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6940                 </links>
6941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6942             <actions>
6943                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6944                     <context link="xact" jump="usr" field="home_ou"/>
6945                 </retrieve>
6946                         </actions>
6947                 </permacrud>
6948         </class>
6949         <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">
6950                 <fields oils_persist:primary="id" oils_persist:sequence="">
6951                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6952                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6953                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6954                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6955                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6956                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6957                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6958                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6959                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6960                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6961                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6962                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6963                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6964                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6965                         <field reporter:label="Goods Payment Detail" name="goods_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="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6971                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6972                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6973                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6974                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6975                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6976                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6977                 </links>
6978         </class>
6979         <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">
6980                 <fields oils_persist:primary="id" oils_persist:sequence="">
6981                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6982                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6983                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6984                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6985                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6986                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6987                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6988                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6989                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6990                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6991                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6992                 </fields>
6993                 <links>
6994                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6995                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6996                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6997                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6998                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6999                 </links>
7000         </class>
7001         <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">
7002                 <fields oils_persist:primary="id" oils_persist:sequence="">
7003                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7004                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7005                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7006                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7007                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7008                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7009                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7010                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7011                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7012                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7013                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7014                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7015                 </fields>
7016                 <links>
7017                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7018                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7019                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7020                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7021                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7022                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7023                 </links>
7024         </class>
7025         <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">
7026                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7027                         <field name="bucket" reporter:datatype="link"/>
7028                         <field name="id" reporter:datatype="id" />
7029                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7030                         <field name="create_time" reporter:datatype="timestamp" />
7031                         <field name="pos" reporter:datatype="int" />
7032                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7033                 </fields>
7034                 <links>
7035                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7036                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7037             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7038                 </links>
7039         </class>
7040         <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">
7041                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7042                         <field name="id" reporter:datatype="id" />
7043                         <field name="item" reporter:datatype="link"/>
7044                         <field name="note" reporter:datatype="text" />
7045                 </fields>
7046                 <links>
7047                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7048                 </links>
7049         </class>
7050         <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">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7052                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7053                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7054                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7055                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7056                 </fields>
7057                 <links>
7058                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7059                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7060                 </links>
7061         </class>
7062     <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">
7063         <fields oils_persist:primary="field">
7064             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7065             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7066             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7067         </fields>
7068         <links/>
7069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7070             <actions>
7071                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7072                 <retrieve />
7073                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7074                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7075             </actions>
7076         </permacrud>
7077     </class>
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7080                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7081                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7082                 </fields>
7083                 <links/>
7084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7085             <actions>
7086                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7087                 <retrieve/>
7088                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7089                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7090             </actions>
7091         </permacrud>
7092         </class>
7093
7094
7095         <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">
7096                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7097                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7098                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7099                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7100                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7101                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7102                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7103                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7104                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7105                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7106                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7107                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7108                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7109                 </fields>
7110                 <links>
7111                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7112                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7113                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7114                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7115                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7116                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7117                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7118                 </links>
7119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7120             <actions>
7121                 <create permission="TRANSIT_COPY">
7122                     <context link="target_copy" field="owner"/>
7123                 </create>
7124                 <retrieve/>
7125                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7126                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7127             </actions>
7128         </permacrud>
7129         </class>
7130         <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">
7131                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7132                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7133                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7134                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7135                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7136                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7137                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7138                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7139                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7140                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7141                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7142                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7143                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7144                 </fields>
7145                 <links>
7146                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7147                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7148                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7149                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7150                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7151                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7152                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7153                 </links>
7154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155             <actions>
7156                 <create permission="TRANSIT_COPY" context_field="owner">
7157                     <context link="target_copy" field="circ_lib"/>
7158                 </create>
7159                 <retrieve/>
7160                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7161                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7162             </actions>
7163         </permacrud>
7164         </class>
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7167                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7168                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7169                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7170                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7171                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7172                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7173                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7174                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7175                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7176                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7177                 </fields>
7178                 <links>
7179                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7180                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7181                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7182                 </links>
7183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7184             <actions>
7185                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7186                     <context link="xact" jump="usr" field="home_ou"/>
7187                 </retrieve>
7188                         </actions>
7189                 </permacrud>
7190         </class>
7191         <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">
7192                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7193                         <field name="grp" />
7194                         <field name="id" reporter:datatype="id" />
7195                         <field name="usr" />
7196                 </fields>
7197                 <links>
7198                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7200                 </links>
7201         </class>
7202         <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">
7203                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7204                         <field name="id" reporter:datatype="id" />
7205                         <field name="fq_field" reporter:datatype="text"/>
7206                         <field name="identity_value" reporter:datatype="text"/>
7207                         <field name="translation" reporter:datatype="text"/>
7208                         <field name="string" reporter:datatype="text"/>
7209                 </fields>
7210                 <links>
7211                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7212                 </links>
7213         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7214             <actions>
7215                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7216                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7217                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7218                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7219             </actions>
7220         </permacrud>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7224                         <field name="id" reporter:datatype="id" />
7225                         <field name="fm_class" reporter:datatype="text"/>
7226                         <field name="field" reporter:datatype="text"/>
7227                         <field name="owner" reporter:datatype="org_unit"/>
7228                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7229                 </fields>
7230                 <links>
7231                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7232                 </links>
7233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7234             <actions>
7235                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7236                 <retrieve/>
7237                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7238                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7239             </actions>
7240         </permacrud>
7241         </class>
7242         <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">
7243                 <fields oils_persist:primary="code">
7244                         <field name="code" reporter:datatype="id" />
7245                         <field name="marc_code" reporter:datatype="text"/>
7246                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7247                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7248                 </fields>
7249                 <links/>
7250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7251             <actions>
7252                 <create permission="CREATE_LOCALE" global_required="true"/>
7253                 <retrieve/>
7254                 <update permission="UPDATE_LOCALE" global_required="true"/>
7255                 <delete permission="DELETE_LOCALE" global_required="true"/>
7256             </actions>
7257         </permacrud>
7258         </class>
7259         <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">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7261                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7262                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7263                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7264             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7265                 </fields>
7266                 <links>
7267                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7268                 </links>
7269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7270             <actions>
7271                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7272                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7273                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7274                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7275             </actions>
7276         </permacrud>
7277         </class>
7278
7279         <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">
7280                 <fields oils_persist:primary="id">
7281                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7282                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7283                 </fields>
7284                 <links/>
7285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7286             <actions>
7287                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7288                 <retrieve/>
7289                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7290                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7291             </actions>
7292         </permacrud>
7293         </class>
7294
7295         <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">
7296                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7297                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7298                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7299                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7300                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7301                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7302                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7303                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7304                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7305                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7306                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7307                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7308                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7309                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7310                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7311                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7312                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7313                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7314                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7315                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7316                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7317                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7318                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7319                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7320                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7321                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7322                 </fields>
7323                 <links>
7324                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7325                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7326                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7327                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7328                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7329                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7330                 </links>
7331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7332             <actions>
7333                 <create permission="user_request.create">
7334                     <context link="usr" field="home_ou"/>
7335                                 </create>
7336                 <retrieve permission="user_request.view">
7337                     <context link="usr" field="home_ou"/>
7338                                 </retrieve>
7339                 <update permission="user_request.update">
7340                     <context link="usr" field="home_ou"/>
7341                                 </update>
7342                 <delete permission="user_request.delete">
7343                     <context link="usr" field="home_ou"/>
7344                                 </delete>
7345             </actions>
7346         </permacrud>
7347         </class>
7348
7349         <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">
7350                 <fields oils_persist:primary="code">
7351                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7352                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7353                 </fields>
7354                 <links/>
7355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7356             <actions>
7357                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7358                 <retrieve/>
7359                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7360                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7361             </actions>
7362         </permacrud>
7363         </class>
7364
7365         <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">
7366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7367                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7368                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7369                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7370                         <field reporter:label="Ratio" name="ratio" />
7371                 </fields>
7372                 <links>
7373                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7374                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7375                 </links>
7376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7377                         <actions>
7378                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7379                                 <retrieve/>
7380                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7381                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7382                         </actions>
7383                 </permacrud>
7384         </class>
7385
7386         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7387                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7388                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7389                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7390                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7391                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7392                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7393                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7394                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7395                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7396                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7397                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7398                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7399                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7400                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7401                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7402                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7403                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7404                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7405                 </fields>
7406                 <links>
7407                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7408                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7409             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7410             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7411             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7412                 </links>
7413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7414             <actions>
7415                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7416                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7417                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7418                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7419             </actions>
7420         </permacrud>
7421         </class>
7422
7423         <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">
7424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7425                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7426                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7427                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7428                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7429                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7430                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7431                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7432                 </fields>
7433                 <links>
7434                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7435                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7436                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7437                 </links>
7438         </class>
7439
7440         <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">
7441                 <fields oils_persist:primary="code">
7442                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7443                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7444                 </fields>
7445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7446             <actions>
7447                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7448                 <retrieve/>
7449                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7450                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7451             </actions>
7452                 </permacrud>
7453         </class>
7454
7455         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7457                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7458                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7459                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7460                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7461                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7462                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7463                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7464                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7465                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7466                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7467                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7468                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7469                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7470                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7471                 </fields>
7472                 <links>
7473                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7474                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7475                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7476                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7477                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7478                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7479                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7480                 </links>
7481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7482             <actions>
7483                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7484                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7485                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7486                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7487             </actions>
7488         </permacrud>
7489         </class>
7490
7491         <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">
7492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7493                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7494                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7495                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7496                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7497                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7498                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7499                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7500                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7501                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7502                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7503                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7504                 </fields>
7505                 <links>
7506                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7507                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7508                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7509                 </links>
7510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7511             <actions>
7512                 <create   permission="ADMIN_INVOICE">
7513                                         <context link="invoice" field="receiver"/>
7514                                 </create>
7515                 <retrieve permission="ADMIN_INVOICE">
7516                                         <context link="invoice" field="receiver"/>
7517                                 </retrieve>
7518                 <update   permission="ADMIN_INVOICE">
7519                                         <context link="invoice" field="receiver"/>
7520                                 </update>
7521                                 <delete   permission="ADMIN_INVOICE">
7522                                         <context link="invoice" field="receiver"/>
7523                                 </delete>
7524             </actions>
7525         </permacrud>
7526         </class>
7527
7528         <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">
7529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7530                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7531                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7532                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7533                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7534                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7535                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7536                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7537                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7538                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7539                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7540                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7541                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7542                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7543                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7544                 </fields>
7545                 <links>
7546                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7547                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7548                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7549                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7550                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7551                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7552                 </links>
7553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7554             <actions>
7555                 <create   permission="ADMIN_INVOICE">
7556                                         <context link="invoice" field="receiver"/>
7557                                 </create>
7558                 <retrieve permission="ADMIN_INVOICE">
7559                                         <context link="invoice" field="receiver"/>
7560                                 </retrieve>
7561                 <update   permission="ADMIN_INVOICE">
7562                                         <context link="invoice" field="receiver"/>
7563                                 </update>
7564                                 <delete   permission="ADMIN_INVOICE">
7565                                         <context link="invoice" field="receiver"/>
7566                                 </delete>
7567             </actions>
7568         </permacrud>
7569         </class>
7570
7571         <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">
7572                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7573                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7574                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7575                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7576                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7577                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7578                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7579                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7580                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7581                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7582                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7583                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7584                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7585                 </fields>
7586                 <links>
7587                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7588                 </links>
7589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7590             <actions>
7591                 <create permission="ADMIN_PROVIDER">
7592                     <context link="provider" field="owner"/>
7593                 </create>
7594                 <retrieve permission="ADMIN_PROVIDER">
7595                     <context link="provider" field="owner"/>
7596                 </retrieve>
7597                 <update permission="ADMIN_PROVIDER">
7598                     <context link="provider" field="owner"/>
7599                 </update>
7600                 <delete permission="ADMIN_PROVIDER">
7601                     <context link="provider" field="owner"/>
7602                 </delete>
7603             </actions>
7604         </permacrud>
7605         </class>
7606
7607         <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">
7608                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7609                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7610                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7611                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7612                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7613                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7614                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7615         </fields>
7616                 <links>
7617                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7618                 </links>
7619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7620             <actions>
7621                 <create permission="ADMIN_PROVIDER">
7622                     <context link="provider" field="owner"/>
7623                 </create>
7624                 <retrieve permission="ADMIN_PROVIDER">
7625                     <context link="provider" field="owner"/>
7626                 </retrieve>
7627                 <update permission="ADMIN_PROVIDER">
7628                     <context link="provider" field="owner"/>
7629                 </update>
7630                 <delete permission="ADMIN_PROVIDER">
7631                     <context link="provider" field="owner"/>
7632                 </delete>
7633             </actions>
7634         </permacrud>
7635     </class>
7636         <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">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7638                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7639                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7640                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7641                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7642                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7643                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7644                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7645                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7646                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7647                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7648                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7649                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7650                 </fields>
7651                 <links>
7652                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7653                 </links>
7654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7655             <actions>
7656                 <create permission="ADMIN_PROVIDER">
7657                     <context link="contact" jump='provider' field="owner"/>
7658                 </create>
7659                 <retrieve permission="ADMIN_PROVIDER">
7660                     <context link="contact" jump='provider' field="owner"/>
7661                 </retrieve>
7662                 <update permission="ADMIN_PROVIDER">
7663                     <context link="contact" jump='provider' field="owner"/>
7664                 </update>
7665                 <delete permission="ADMIN_PROVIDER">
7666                     <context link="contact" jump='provider' field="owner"/>
7667                 </delete>
7668             </actions>
7669         </permacrud>
7670         </class>
7671
7672         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7674                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7675                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7676                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7677                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7678                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7679                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7680                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7681                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7682                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7683                 </fields>
7684                 <links>
7685                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7686                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7687                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7688                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7689                 </links>
7690         </class>
7691
7692         <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">
7693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7694                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7695                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7696                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7697                 </fields>
7698                 <links>
7699             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7700                 </links>
7701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7702                         <actions>
7703                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7704                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7705                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7706                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7707                         </actions>
7708                 </permacrud>
7709         </class>
7710
7711         <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">
7712                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7713                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7714                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7715                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7716                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7717                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7718                 </fields>
7719                 <links>
7720                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7721                 </links>
7722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7723                         <actions>
7724                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7725                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7726                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7727                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7728                         </actions>
7729                 </permacrud>
7730         </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7734                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7735                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7736                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7737                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7738                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7739                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7740                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7741                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7742                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7743                 </fields>
7744                 <links>
7745                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7746                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7747             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7748             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7749                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7750                 </links>
7751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7752             <actions>
7753                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7754                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7755                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7756                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7757             </actions>
7758         </permacrud>
7759         </class>
7760
7761         <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">
7762                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7763                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7764                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7765                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7766                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7767                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7768                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7769                 </fields>
7770                 <links>
7771                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7772                 </links>
7773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7774                         <actions>
7775                                 <create permission="ADMIN_FUNDING_SOURCE">
7776                     <context link="funding_source" field="owner"/>
7777                 </create>
7778                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7779                     <context link="funding_source" field="owner"/>
7780                 </retrieve>
7781                                 <update permission="ADMIN_FUNDING_SOURCE">
7782                     <context link="funding_source" field="owner"/>
7783                 </update>
7784                                 <delete permission="ADMIN_FUNDING_SOURCE">
7785                     <context link="funding_source" field="owner"/>
7786                 </delete>
7787                         </actions>
7788                 </permacrud>
7789         </class>
7790
7791         <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">
7792                 <fields oils_persist:primary="id">
7793                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7794                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7795                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7796                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7797                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7798                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7799                 </fields>
7800                 <links>
7801                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7802                 </links>
7803         </class>
7804
7805         <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">
7806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7807                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7808                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7809                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7810                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7811                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7812                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7813                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7814                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7815                 </fields>
7816                 <links>
7817                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7818                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7819                 </links>
7820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7821                         <actions>
7822                                 <create permission="ADMIN_ACQ_FUND">
7823                     <context link="fund" field="org"/>
7824                 </create>
7825                                 <retrieve permission="ADMIN_ACQ_FUND">
7826                     <context link="fund" field="org"/>
7827                 </retrieve>
7828                                 <update permission="ADMIN_ACQ_FUND">
7829                     <context link="fund" field="org"/>
7830                 </update>
7831                                 <delete permission="ADMIN_ACQ_FUND">
7832                     <context link="fund" field="org"/>
7833                 </delete>
7834                         </actions>
7835                 </permacrud>
7836         </class>
7837
7838         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7839                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7840                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7841                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7842                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7843                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7844                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7845                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7846                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7847                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7848                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7849                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7850                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7851                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7852                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7853                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7854                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7855                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7856                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7857                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7858                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7859                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7860                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7861                 </fields>
7862                 <links>
7863                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7864                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7865             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7866             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7867             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7868             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7869             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7870             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7871             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7872             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7873             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7874                 </links>
7875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7876             <actions>
7877                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7878                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7879                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7880                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7881             </actions>
7882         </permacrud>
7883         </class>
7884
7885         <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">
7886                 <fields oils_persist:primary="fund">
7887                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7888                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7889                 </fields>
7890                 <links>
7891                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7892                 </links>
7893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7894             <actions>
7895                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7896                                         <context link="fund" field="org" />
7897                 </retrieve>
7898             </actions>
7899         </permacrud>
7900         </class>
7901
7902         <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">
7903                 <fields oils_persist:primary="fund">
7904                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7905                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7906                 </fields>
7907                 <links>
7908                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7909                 </links>
7910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7911             <actions>
7912                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7913                                         <context link="fund" field="org" />
7914                 </retrieve>
7915             </actions>
7916         </permacrud>
7917         </class>
7918
7919         <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">
7920                 <fields oils_persist:primary="fund">
7921                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7922                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7923                 </fields>
7924                 <links>
7925                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7926                 </links>
7927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7928             <actions>
7929                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7930                                         <context link="fund" field="org" />
7931                 </retrieve>
7932             </actions>
7933         </permacrud>
7934         </class>
7935
7936         <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">
7937                 <fields oils_persist:primary="fund">
7938                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7939                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7940                 </fields>
7941                 <links>
7942                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7943                 </links>
7944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7945             <actions>
7946                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7947                                         <context link="fund" field="org" />
7948                 </retrieve>
7949             </actions>
7950         </permacrud>
7951         </class>
7952
7953         <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">
7954                 <fields oils_persist:primary="fund">
7955                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7956                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7957                 </fields>
7958                 <links>
7959                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7960                 </links>
7961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7962             <actions>
7963                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7964                                         <context link="fund" field="org" />
7965                 </retrieve>
7966             </actions>
7967         </permacrud>
7968         </class>
7969
7970    <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">
7971         <fields oils_persist:primary="fund">
7972             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7973             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7974         </fields>
7975         <links>
7976             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7977         </links>
7978     </class>
7979
7980    <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">
7981         <fields oils_persist:primary="fund">
7982             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7983             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7984         </fields>
7985         <links>
7986             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7987         </links>
7988     </class>
7989
7990    <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">
7991         <fields oils_persist:primary="fund">
7992             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7993             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7994         </fields>
7995         <links>
7996             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7997         </links>
7998     </class>
7999
8000    <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">
8001         <fields oils_persist:primary="fund">
8002             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8003             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8004         </fields>
8005         <links>
8006             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8007         </links>
8008     </class>
8009
8010    <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">
8011         <fields oils_persist:primary="fund">
8012             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8013             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8014         </fields>
8015         <links>
8016             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8017         </links>
8018     </class>
8019
8020         <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">
8021                 <fields oils_persist:primary="funding_source">
8022                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8023                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8024                 </fields>
8025                 <links>
8026                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8027                 </links>
8028         </class>
8029
8030         <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">
8031                 <fields oils_persist:primary="funding_source">
8032                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8033                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8034                 </fields>
8035                 <links>
8036                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8037                 </links>
8038         </class>
8039
8040         <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">
8041                 <fields oils_persist:primary="funding_source">
8042                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8043                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8044                 </fields>
8045                 <links>
8046                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8047                 </links>
8048         </class>
8049
8050         <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">
8051                 <fields oils_persist:primary="fund">
8052                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8053                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8054                 </fields>
8055                 <links>
8056                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8057                 </links>
8058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8059             <actions>
8060                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8061                                         <context link="fund" field="org" />
8062                 </retrieve>
8063             </actions>
8064         </permacrud>
8065     </class>
8066     <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">
8067         <oils_persist:source_definition><![CDATA[
8068             SELECT
8069                 acqf.*,
8070                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8071                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8072                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8073                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8074             FROM
8075                 acq.fund acqf
8076                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8077                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8078                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8079                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8080         ]]></oils_persist:source_definition>
8081         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8082             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8083             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8084             <field reporter:label="Name" name="name" reporter:datatype="text" />
8085             <field reporter:label="Year" name="year" reporter:datatype="int" />
8086             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8087             <field reporter:label="Code" name="code" reporter:datatype="text" />
8088             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8089             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8090             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8091             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8092             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8093
8094             <!-- non fund-native fields -->
8095             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8096             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8097             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8098             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8099         </fields>
8100         <links>
8101             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8102             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8103             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8104         </links>
8105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8106             <actions>
8107                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8108             </actions>
8109         </permacrud>
8110         </class>
8111         <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">
8112                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8113                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8114                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8115                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8116                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8117                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8118                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8119                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8120                 </fields>
8121                 <links>
8122                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8123                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8124                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8125                 </links>
8126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8127                         <actions>
8128                                 <create permission="ADMIN_ACQ_FUND">
8129                     <context link="fund" field="org"/>
8130                 </create>
8131                                 <retrieve permission="ADMIN_ACQ_FUND">
8132                     <context link="fund" field="org"/>
8133                 </retrieve>
8134                                 <update permission="ADMIN_ACQ_FUND">
8135                     <context link="fund" field="org"/>
8136                 </update>
8137                                 <delete permission="ADMIN_ACQ_FUND">
8138                     <context link="fund" field="org"/>
8139                 </delete>
8140                         </actions>
8141                 </permacrud>
8142         </class>
8143
8144     <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">
8145         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8146             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8147             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8148             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8149             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8150             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8151             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8152             <field reporter:label="Note" name="note" reporter:datatype="text" />
8153             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8154         </fields>
8155         <links>
8156             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8157             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8158             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8159         </links>
8160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161                         <actions>
8162                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8163                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8164                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8165                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8166                         </actions>
8167                 </permacrud>
8168     </class>
8169
8170         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8172                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8173                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8174                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8175                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8176                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8177                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8178                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8179                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8180                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8181                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8182                 </fields>
8183                 <links>
8184                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8185                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8186                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8187                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8188                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8189                 </links>
8190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8191                         <actions>
8192                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8193                         </actions>
8194                 </permacrud>
8195         </class>
8196
8197         <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">
8198                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8199                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8200                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8201                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8202                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8203                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8204                 </fields>
8205                 <links>
8206                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8207                 </links>
8208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8209                         <actions>
8210                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8211                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8212                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8213                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8214                         </actions>
8215                 </permacrud>
8216         </class>
8217
8218         <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">
8219                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8220                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8221                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8222                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8223                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8224                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8225                         <field reporter:label="State" name="state" reporter:datatype="text" />
8226                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8227                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8228                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8229                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8230                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8231                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8232                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8233                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8234                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8235                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8236                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8237                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8238                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8239                 </fields>
8240                 <links>
8241                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8242                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8243                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8244                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8245                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8246                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8247                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8248                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8249                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8250                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8251                 </links>
8252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8253                         <actions>
8254                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8255                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8256                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8257                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8258                         </actions>
8259                 </permacrud>
8260         </class>
8261
8262         <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">
8263                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8264                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8265                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8266                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8267                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8268                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8269                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8270                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8271                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8272                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8273                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8274                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8275                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8276                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8277                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8278                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8279                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8280                 </fields>
8281                 <links>
8282                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8283                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8284                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8285                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8286                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8287                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8288                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8289                 </links>
8290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8291             <actions>
8292                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8293             </actions>
8294                 </permacrud>
8295         </class>
8296
8297         <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">
8298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8299                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8300                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8301                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8302                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8303                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8304                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8305                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8306                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8307                 </fields>
8308                 <links>
8309                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8310                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8311                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8312                 </links>
8313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8314             <actions>
8315                 <create permission="CREATE_PURCHASE_ORDER">
8316                     <context link="purchase_order" field="ordering_agency"/>
8317                 </create>
8318                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8319                     <context link="purchase_order" field="ordering_agency"/>
8320                 </retrieve>
8321                 <update permission="CREATE_PURCHASE_ORDER">
8322                     <context link="purchase_order" field="ordering_agency"/>
8323                 </update>
8324                 <delete permission="CREATE_PURCHASE_ORDER">
8325                     <context link="purchase_order" field="ordering_agency"/>
8326                 </delete>
8327             </actions>
8328                 </permacrud>
8329         </class>
8330
8331         <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">
8332                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8333                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8334                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8335                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8336                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8337                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8338                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8339                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8340                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8341                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8342                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8343                 </fields>
8344                 <links>
8345                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8346                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8347                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8348                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8349                 </links>
8350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8351             <actions>
8352                 <create permission="CREATE_PURCHASE_ORDER">
8353                     <context link="purchase_order" field="ordering_agency"/>
8354                 </create>
8355                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8356                     <context link="purchase_order" field="ordering_agency"/>
8357                 </retrieve>
8358                 <update permission="CREATE_PURCHASE_ORDER">
8359                     <context link="purchase_order" field="ordering_agency"/>
8360                 </update>
8361                 <delete permission="CREATE_PURCHASE_ORDER">
8362                     <context link="purchase_order" field="ordering_agency"/>
8363                 </delete>
8364             </actions>
8365                 </permacrud>
8366         </class>
8367
8368         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8369                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8370                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8371                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8372                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8373                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8374                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8375                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8376                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8377                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8378                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8379                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8380                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8381                         <field reporter:label="State" name="state" reporter:datatype="text" />
8382                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8383                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8384                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8385                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8386                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8387                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8388                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8389                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8390                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8391                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8392                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8393                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8394                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8395                 </fields>
8396                 <links>
8397                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8398                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8399                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8400                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8401                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8402                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8403                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8404                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8405                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8406                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8407                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8408                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8409                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8410                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8411                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8412                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8413                 </links>
8414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8415                         <actions>
8416                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8417                                         <context link="purchase_order" field="ordering_agency"/>
8418                                         <context link="picklist" field="org_unit"/>
8419                                 </retrieve>
8420                         </actions>
8421                 </permacrud>
8422         </class>
8423
8424         <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">
8425                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8426                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8427                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8428                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8429                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8430                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8431                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8432                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8433                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8434                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8435                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8436                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8437                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8438                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8439                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8440                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8441                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8443                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8444                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8445                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8446                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8447                 </fields>
8448                 <links>
8449                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8451                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8452                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8453                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8454                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8455                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8456                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8457                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8458                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8459                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8460                 </links>
8461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8462                         <actions>
8463                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8464                                         <context link="purchase_order" field="ordering_agency"/>
8465                                         <context link="picklist" field="org_unit"/>
8466                                 </retrieve>
8467                         </actions>
8468                 </permacrud>
8469         </class>
8470
8471         <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">
8472                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8473                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8474                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8475                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8476                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8477                 </fields>
8478                 <links>
8479                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8480                 </links>
8481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8482                         <actions>
8483                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8484                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8485                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8486                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8487                         </actions>
8488                 </permacrud>
8489         </class>
8490
8491         <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">
8492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8493                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8494                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8495                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8496                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8497                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8498                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8499                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8500                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8501                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8502                 </fields>
8503                 <links>
8504                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8505                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8506                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8507                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8508                 </links>
8509         </class>
8510
8511         <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">
8512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8513                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8514                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8515                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8516                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8517                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8518                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8519                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8520                 </fields>
8521                 <links>
8522                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8523                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8524                 </links>
8525         </class>
8526
8527         <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">
8528                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8529                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8530                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8531                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8532                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8533                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8534                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8535                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8536                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8537                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8538                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8539                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8540                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8541                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8542                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8543                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8544                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8545                 </fields>
8546                 <links>
8547                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8548                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8549                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8550                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8551                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8552                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8553                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8554                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8555                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8556                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8557                 </links>
8558         </class>
8559
8560         <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">
8561                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8562                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8563                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8564                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8565                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8566                 </fields>
8567                 <links/>
8568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8569                         <actions>
8570                                 <retrieve />
8571                         </actions>
8572                 </permacrud>
8573         </class>
8574
8575         <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">
8576                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8577                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8578                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8579                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8580                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8581                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8582             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8583                 </fields>
8584                 <links/>
8585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8586             <actions>
8587                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8588                 <retrieve />
8589                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8590                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8591             </actions>
8592         </permacrud>
8593         </class>
8594
8595         <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">
8596                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8597                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8598                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8599                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8600                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8601                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8602                 </fields>
8603                 <links/>
8604         </class>
8605         <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">
8606                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8607                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8608                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8609                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8610                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8611                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8612                 </fields>
8613                 <links>
8614                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8615                 </links>
8616         </class>
8617
8618         <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">
8619             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8620                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8621                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8622                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8623                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8624                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8625                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8626         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8627
8628             </fields>
8629             <links>
8630                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8631             </links>
8632             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8633                 <actions>
8634                     <create permission="ADMIN_PROVIDER">
8635                         <context link="provider" field="owner"/>
8636                     </create>
8637                     <retrieve permission="ADMIN_PROVIDER">
8638                         <context link="provider" field="owner"/>
8639                     </retrieve>
8640                     <update permission="ADMIN_PROVIDER">
8641                         <context link="provider" field="owner"/>
8642                     </update>
8643                     <delete permission="ADMIN_PROVIDER">
8644                         <context link="provider" field="owner"/>
8645                     </delete>
8646                 </actions>
8647             </permacrud>
8648         </class>
8649         
8650         <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">
8651             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8652                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8653                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8654                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8655                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8656             </fields>
8657             <links>
8658                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8659             </links>
8660             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8661                 <actions>
8662                     <create permission="ADMIN_PROVIDER">
8663                         <context link="provider" field="owner"/>
8664                     </create>
8665                     <retrieve permission="ADMIN_PROVIDER">
8666                         <context link="provider" field="owner"/>
8667                     </retrieve>
8668                     <update permission="ADMIN_PROVIDER">
8669                         <context link="provider" field="owner"/>
8670                     </update>
8671                     <delete permission="ADMIN_PROVIDER">
8672                         <context link="provider" field="owner"/>
8673                     </delete>
8674                 </actions>
8675             </permacrud>
8676         </class>
8677         
8678         <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">
8679             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8680                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8681                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8682                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8683                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8684                 </fields>
8685                 <links/>
8686         </class>
8687
8688         <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">
8689                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8690                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8691                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8692                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8693                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8694                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8695                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8696                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8697                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8698                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8699                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8700                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8701                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8702                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8703                 </fields>
8704                 <links>
8705                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8706                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8707                 </links>
8708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8709             <actions>
8710                 <create permission="ADMIN_PROVIDER">
8711                     <context link="provider" field="owner"/>
8712                 </create>
8713                 <retrieve permission="ADMIN_PROVIDER">
8714                     <context link="provider" field="owner"/>
8715                 </retrieve>
8716                 <update permission="ADMIN_PROVIDER">
8717                     <context link="provider" field="owner"/>
8718                 </update>
8719                 <delete permission="ADMIN_PROVIDER">
8720                     <context link="provider" field="owner"/>
8721                 </delete>
8722             </actions>
8723         </permacrud>
8724         </class>
8725
8726         <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">
8727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8728                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8729                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8730                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8731                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8732                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8733                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8734                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8735                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8736                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8737                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8738                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8739                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8740                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8741                 </fields>
8742                 <links>
8743                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8744                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8745                 </links>
8746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8747             <actions>
8748                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8749                     <context link="account" jump="provider" field="owner"/>
8750                 </retrieve>
8751                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8752                     <context link="account" jump="provider" field="owner"/>
8753                 </update>
8754                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8755                     <context link="account" jump="provider" field="owner"/>
8756                 </delete>
8757             </actions>
8758         </permacrud>
8759         </class>
8760
8761
8762         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8763                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8764                         <field name="id" reporter:datatype="id" />
8765                         <field name="parent" reporter:datatype="link"/>
8766                         <field name="owner" reporter:datatype="link"/>
8767                         <field name="create_time" reporter:datatype="timestamp"/>
8768                         <field name="name" reporter:datatype="text"/>
8769                         <field name="shared" reporter:datatype="bool"/>
8770                         <field name="share_with" reporter:datatype="link"/>
8771                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8772                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8773                 </fields>
8774                 <links>
8775                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8776                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8777                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8778                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8779                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8780                 </links>
8781         </class>
8782         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8783                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8784                         <field name="id" reporter:datatype="id" />
8785                         <field name="parent" reporter:datatype="link"/>
8786                         <field name="owner" reporter:datatype="link"/>
8787                         <field name="create_time" reporter:datatype="timestamp"/>
8788                         <field name="name" reporter:datatype="text"/>
8789                         <field name="shared" reporter:datatype="bool"/>
8790                         <field name="share_with" reporter:datatype="link"/>
8791                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8792                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8793                 </fields>
8794                 <links>
8795                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8796                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8797                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8798                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8799                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8800                 </links>
8801         </class>
8802         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8803                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8804                         <field name="id" reporter:datatype="id" />
8805                         <field name="parent" reporter:datatype="link"/>
8806                         <field name="owner" reporter:datatype="link"/>
8807                         <field name="create_time" reporter:datatype="timestamp"/>
8808                         <field name="name" reporter:datatype="text"/>
8809                         <field name="shared" reporter:datatype="bool"/>
8810                         <field name="share_with" reporter:datatype="link"/>
8811                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8812                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8813                 </fields>
8814                 <links>
8815                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8816                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8817                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8818                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8819                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8820                 </links>
8821         </class>
8822         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8823                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8824                         <field name="id" reporter:datatype="id" />
8825                         <field name="owner" reporter:datatype="link"/>
8826                         <field name="create_time" reporter:datatype="timestamp"/>
8827                         <field name="name" reporter:datatype="text"/>
8828                         <field name="data" reporter:datatype="text"/>
8829                         <field name="folder" reporter:datatype="link"/>
8830                         <field name="description" reporter:datatype="text"/>
8831                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8832                 </fields>
8833                 <links>
8834                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8835                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8836                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8837                 </links>
8838         </class>
8839         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8840                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8841                         <field name="id" reporter:datatype="id" />
8842                         <field name="owner" reporter:datatype="link"/>
8843                         <field name="create_time" reporter:datatype="timestamp"/>
8844                         <field name="template" reporter:datatype="link"/>
8845                         <field name="data" reporter:datatype="text"/>
8846                         <field name="folder" reporter:datatype="link"/>
8847                         <field name="recur" reporter:datatype="bool"/>
8848                         <field name="recurrence" reporter:datatype="interval"/>
8849                         <field name="name" reporter:datatype="text"/>
8850                         <field name="description" reporter:datatype="text"/>
8851                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8852                 </fields>
8853                 <links>
8854                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8855                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8856                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8857                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8858                 </links>
8859         </class>
8860         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8861                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8862                         <field name="id" reporter:datatype="id" />
8863                         <field name="runner" reporter:datatype="link"/>
8864                         <field name="start_time" reporter:datatype="timestamp"/>
8865                         <field name="complete_time" reporter:datatype="timestamp"/>
8866                         <field name="run_time" reporter:datatype="timestamp"/>
8867                         <field name="email" reporter:datatype="text"/>
8868                         <field name="excel_format" reporter:datatype="bool"/>
8869                         <field name="csv_format" reporter:datatype="bool"/>
8870                         <field name="html_format" reporter:datatype="bool"/>
8871                         <field name="error_code" reporter:datatype="int"/>
8872                         <field name="error_text" reporter:datatype="text"/>
8873                         <field name="report" reporter:datatype="link"/>
8874                         <field name="folder" reporter:datatype="link"/>
8875                         <field name="chart_pie" reporter:datatype="bool"/>
8876                         <field name="chart_bar" reporter:datatype="bool"/>
8877                         <field name="chart_line" reporter:datatype="bool"/>
8878                 </fields>
8879                 <links>
8880                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8881                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8882                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8883                 </links>
8884         </class>
8885         <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">
8886                 <fields oils_persist:primary="id">
8887                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8888                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8889                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8890                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8891                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8892                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8893                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8894                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8895                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8896                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8897                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8898                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8899                 </fields>
8900                 <links>
8901                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8902                 </links>
8903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8904                         <actions>
8905                                 <retrieve />
8906                         </actions>
8907                 </permacrud>
8908         </class>
8909         <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">
8910                 <fields oils_persist:primary="id">
8911                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8912                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8913                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8914                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8915                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8916                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8917                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8918                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8919                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8920                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8921                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8922                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8923                 </fields>
8924                 <links>
8925                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8926                 </links>
8927         </class>
8928         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8929                 <fields oils_persist:primary="id">
8930                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8931                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8932                         <field reporter:label="Fingerprint" name="fingerprint" />
8933                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8934                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8935                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8936                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8937                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8938                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8939                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8940                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8941                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8942                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8943                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8944                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8945                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8946                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8947                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8948                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8949                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8950                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8951                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8952                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8953                 </fields>
8954                 <links>
8955                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8956                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8957                 </links>
8958         </class>
8959         <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">
8960                 <fields oils_persist:primary="id">
8961                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8962                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8963                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8964                 </fields>
8965                 <links>
8966                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8967                 </links>
8968         </class>
8969         <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">
8970                 <fields oils_persist:primary="id">
8971                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8972                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8973                 </fields>
8974                 <links>
8975                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8976                 </links>
8977         </class>
8978         <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">
8979                 <fields oils_persist:primary="id">
8980                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8981                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8982                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8983                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8984                 </fields>
8985                 <links>
8986                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8987                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8988                 </links>
8989         </class>
8990         <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">
8991                 <fields oils_persist:primary="xact">
8992                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8993                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8994                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8995                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8996                 </fields>
8997                 <links>
8998                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8999                 </links>
9000         </class>
9001         <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">
9002                 <fields oils_persist:primary="xact">
9003                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9004                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9005                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9006                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9007                 </fields>
9008                 <links>
9009                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9010                 </links>
9011         </class>
9012         <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)">
9013                 <fields oils_persist:primary="id">
9014                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9015                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9016                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9017                 </fields>
9018                 <links>
9019                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9020                 </links>
9021         </class>
9022         <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">
9023                 <fields oils_persist:primary="id">
9024                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9025                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9026                 </fields>
9027                 <links>
9028                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9029                 </links>
9030         </class>
9031         <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">
9032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9033                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9034                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9035                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9036                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9037                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9038                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9039                 </fields>
9040                 <links>
9041                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9042                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9043                 </links>
9044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9045                         <actions>
9046                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9047                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9048                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9049                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9050                         </actions>
9051                 </permacrud>
9052         </class>
9053         <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">
9054                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9055                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9056                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9057                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9058                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9059                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9060                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9061                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9062                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9063                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9064                 </fields>
9065                 <links>
9066                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9067                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9068                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9069                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9070                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9071                 </links>
9072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9073                         <actions>
9074                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9075                                         <context link="formula" field="owner"/>
9076                                 </create>
9077                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9078                                         <context link="formula" field="owner"/>
9079                                 </retrieve>
9080                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9081                                         <context link="formula" field="owner"/>
9082                                 </update>
9083                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9084                                         <context link="formula" field="owner"/>
9085                                 </delete>
9086                         </actions>
9087                 </permacrud>
9088         </class>
9089
9090         <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">
9091                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9093                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9094                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9095                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9096                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9097                 </fields>
9098                 <links>
9099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9100                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9101                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9102                 </links>
9103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9104                         <actions>
9105                                 <create permission="CREATE_PURCHASE_ORDER">
9106                                         <context link="formula" field="owner"/>
9107                 </create>
9108                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9109                                         <context link="formula" field="owner"/>
9110                 </retrieve>
9111                                 <update permission="CREATE_PURCHASE_ORDER">
9112                                         <context link="formula" field="owner"/>
9113                 </update>
9114                                 <delete permission="CREATE_PURCHASE_ORDER">
9115                                         <context link="formula" field="owner"/>
9116                 </delete>
9117                         </actions>
9118                 </permacrud>
9119         </class>
9120
9121         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9122                 <fields oils_persist:primary="id">
9123                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9124                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9125                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9126                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9127                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9128                 </fields>
9129                 <links>
9130                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9131                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9132                 </links>
9133         </class>
9134
9135         <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">
9136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9137                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9138                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9139                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9140                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9141                 </fields>
9142                 <links>
9143                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9144                 </links>
9145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9146                         <actions>
9147                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9148                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9149                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9150                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9151                         </actions>
9152                 </permacrud>
9153         </class>
9154
9155         <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">
9156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9157                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9158                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9159                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9160                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9161                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9162                 </fields>
9163                 <links>
9164                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9165                 </links>
9166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9167                         <actions>
9168                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9169                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9170                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9171                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9172                         </actions>
9173                 </permacrud>
9174         </class>
9175
9176         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9178                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9179                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9180                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9181                 </fields>
9182                 <links>
9183                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9184                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9185                 </links>
9186         </class>
9187
9188         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9189                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9190                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9191                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9192                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9193                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9194                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9195                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9196                 </fields>
9197                 <links>
9198                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9199                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9200                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9201                 </links>
9202         </class>
9203
9204         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9206                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9207                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9208                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9209                 </fields>
9210                 <links>
9211                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9212                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9213                 </links>
9214         </class>
9215
9216         <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">
9217                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9218                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9219                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9220                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9221                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9222                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9223                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9224                 </fields>
9225                 <links>
9226                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9227                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9228                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9229                 </links>
9230         </class>
9231
9232         <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">
9233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9234                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9235                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9236                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9237                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9238                 </fields>
9239                 <links>
9240                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9241                 </links>
9242                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9243             <actions>
9244                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9245                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9246                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9247                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9248             </actions>
9249                 </permacrud>
9250         </class>
9251
9252         <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">
9253                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9254                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9255                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9256                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9257                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9258                 </fields>
9259                 <links>
9260                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9261                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9262                 </links>
9263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9264                         <actions>
9265                                 <create permission="ADMIN_CLAIM_POLICY">
9266                                         <context link="claim_policy" field="org_unit"/>
9267                 </create>
9268                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9269                                         <context link="claim_policy" field="org_unit"/>
9270                 </retrieve>
9271                                 <update permission="ADMIN_CLAIM_POLICY">
9272                                         <context link="claim_policy" field="org_unit"/>
9273                 </update>
9274                                 <delete permission="ADMIN_CLAIM_POLICY">
9275                                         <context link="claim_policy" field="org_unit"/>
9276                 </delete>
9277                         </actions>
9278                 </permacrud>
9279         </class>
9280
9281     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9282         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9283             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9284             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9285             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9286             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9287             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9288             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9289             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9290             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9291             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9292             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9293             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9294             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9295             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9296             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9297             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9298             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9299         </fields>
9300         <links>
9301             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9302         </links>
9303     </class>
9304
9305     <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">
9306         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9307             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9308             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9309             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9310             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9311             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9312         </fields>
9313     </class>
9314
9315     <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">
9316         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9317             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9318             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9319             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9320             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9321             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9322             <field reporter:label="City" name="city" reporter:datatype="text"/>
9323             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9324             <field reporter:label="State" name="state" reporter:datatype="text"/>
9325             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9326             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9327             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9328         </fields>
9329     </class>
9330
9331     <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">
9332         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9333             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9334             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9335             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9336             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9337             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9338             <field reporter:label="City" name="city" reporter:datatype="text"/>
9339             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9340             <field reporter:label="State" name="state" reporter:datatype="text"/>
9341             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9342             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9343             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9344         </fields>
9345     </class>
9346
9347     <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">
9348         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9349             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9350             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9351             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9352             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9353             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9354             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9355         </fields>
9356     </class>
9357
9358         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9359                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9360                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9361                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9362                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9363                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9364                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9365                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9366                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9367                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9368                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9369                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9370                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9371                 </fields>
9372                 <links>
9373                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9374                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9375                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9376                 </links>
9377         </class>
9378
9379         <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">
9380                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9381                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9382                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9383                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9384                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9385                 </fields>
9386                 <links>
9387                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9388                 </links>
9389         </class>
9390
9391     <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">
9392         <fields>
9393             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9394             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9395             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9396         </fields>
9397                 <links>
9398                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9399                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9400                 </links>
9401     </class>
9402
9403     <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">
9404         <fields>
9405             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9406             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9407         </fields>
9408                 <links>
9409                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9410                 </links>
9411     </class>
9412
9413     <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">
9414         <fields>
9415             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9416             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9417             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9418         </fields>
9419                 <links>
9420                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9421                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9422                 </links>
9423     </class>
9424
9425     <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">
9426         <fields>
9427             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9428             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9429         </fields>
9430                 <links>
9431                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9432                 </links>
9433     </class>
9434
9435     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9436                 <oils_persist:source_definition>
9437
9438             SELECT  DISTINCT l.*
9439               FROM  action.unfulfilled_hold_loops l
9440                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9441               WHERE l.count = m.max
9442
9443                 </oils_persist:source_definition>
9444         <fields>
9445             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9446             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9447             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9448         </fields>
9449                 <links>
9450                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9451                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9452                 </links>
9453     </class>
9454
9455         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9456                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9457                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9458                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9459                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9460                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9461                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9462                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9463                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9464                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9465                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9466                 </fields>
9467                 <links>
9468                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9469                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9470                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9471                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9472                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9473                 </links>
9474         </class>
9475
9476         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9477                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9478                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9479                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9480                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9481                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9482                 </fields>
9483                 <links>
9484                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9485                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9486                 </links>
9487         </class>
9488
9489         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9490                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9491                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9492                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9493                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9494                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9495                 </fields>
9496                 <links>
9497                 </links>
9498         </class>
9499
9500         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9501                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9502                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9503                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9504                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9505                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9506                 </fields>
9507                 <links>
9508                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9509                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9510                 </links>
9511         </class>
9512         
9513         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9514                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9515                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9516                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9517                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9518                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9519                 </fields>
9520                 <links>
9521                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9522                 </links>
9523         </class>
9524         
9525         <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">
9526                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9527                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9528                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9529                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9530                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9531                 </fields>
9532                 <links>
9533                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9534                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9535                 </links>
9536         </class>
9537
9538         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9539                 <fields oils_persist:primary="name">
9540                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9541                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9542                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9543                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9544                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9545                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9546                 </fields>
9547                 <links>
9548                 </links>
9549         </class>
9550
9551         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9552                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9553                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9554                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9555                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9556                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9557                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9558                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9559                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9560                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9561                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9562                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9563                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9564                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9565                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9566                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9567                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9568                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9569                 </fields>
9570                 <links>
9571                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9572                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9573                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9574                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9575                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9576                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9577                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9578                 </links>
9579         </class>
9580
9581         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9582                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9583                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9584                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9585                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9586                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9587                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9588                 </fields>
9589                 <links>
9590                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9591                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9592                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9593                 </links>
9594         </class>
9595
9596         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9597                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9598                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9599                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9600                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9601                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9602                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9603                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9604                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9605                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9606                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9607                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9608                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9609                 </fields>
9610                 <links>
9611                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9612                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9613                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9614                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9615                 </links>
9616         </class>
9617
9618         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9619                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9620                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9621                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9622                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9623                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9624                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9625                 </fields>
9626                 <links>
9627                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9628                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9629                 </links>
9630         </class>
9631
9632         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9633                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9634                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9635                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9636                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9637                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9638                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9639                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9640                 </fields>
9641                 <links>
9642                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9643                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9644                 </links>
9645         </class>
9646
9647         <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">
9648                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9649                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9650                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9651                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9652                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9653                 </fields>
9654                 <links>
9655                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9656                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9657                 </links>
9658         </class>
9659
9660         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9661                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9662                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9663                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9664                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9665                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9666                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9667                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9668                 </fields>
9669                 <links>
9670                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9671                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9672                 </links>
9673         </class>
9674
9675         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9676                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9677                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9678                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9679                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9680                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9681                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9682                 </fields>
9683                 <links>
9684                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9685                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9686                 </links>
9687         </class>
9688
9689         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9690                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9691                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9692                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9693                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9694                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9695                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9696                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9697                 </fields>
9698                 <links>
9699                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9700                 </links>
9701         </class>
9702
9703         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9704                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9705                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9706                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9707                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9708                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9709                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9710                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9711                 </fields>
9712                 <links>
9713                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9714                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9715                 </links>
9716         </class>
9717
9718         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9719                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9720                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9721                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9722                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9723                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9724                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9725                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9726                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9727                 </fields>
9728                 <links>
9729                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9730                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9731                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9732                 </links>
9733         </class>
9734
9735         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9736                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9737                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9738                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9739                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9740                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9741                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9742                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9743                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9744                 </fields>
9745                 <links>
9746                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9747                 </links>
9748         </class>
9749
9750         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9751                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9752                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9753                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9754                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9755                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9756                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9757                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9758                 </fields>
9759                 <links>
9760                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9761                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9762                 </links>
9763         </class>
9764
9765         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9767                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9768                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9769                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9770                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9771                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9772                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9773                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9774                 </fields>
9775                 <links>
9776                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9777                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9778                 </links>
9779         </class>
9780
9781         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9782                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9783                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9784                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9785                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9787                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9788                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9789                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9790                 </fields>
9791                 <links>
9792                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9793                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9794                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9795                 </links>
9796         </class>
9797
9798         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9799                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9800                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9801                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9802                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9803                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9804                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9805                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9806                 </fields>
9807                 <links>
9808                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9809                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9810                 </links>
9811         </class>
9812
9813         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9814                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9815                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9816                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9817                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9818                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9819                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9820                 </fields>
9821                 <links>
9822                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9823                 </links>
9824         </class>
9825
9826         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9827                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9828                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9829                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9830                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9831                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9832                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9833                 </fields>
9834                 <links>
9835                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9836                 </links>
9837         </class>
9838
9839         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9840                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9841                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9842                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9843                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9844                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9845                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9846                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9847                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9849                 </fields>
9850                 <links>
9851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9852                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9853                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9854                 </links>
9855         </class>
9856
9857         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9858                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9859                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9860                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9861                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9862                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9863                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9864                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9865                 </fields>
9866                 <links>
9867                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9868                 </links>
9869         </class>
9870
9871         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9872                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9873                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9874                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9875                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9876                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9877                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9878                 </fields>
9879                 <links>
9880                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9881                 </links>
9882         </class>
9883
9884         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9885                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9886                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9887                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9888                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9889                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9890                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9891                 </fields>
9892                 <links>
9893                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9894                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9895                 </links>
9896         </class>
9897
9898         <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">
9899                 <fields oils_persist:primary="id">
9900                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9901                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9902                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9903                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9904                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9905                 </fields>
9906                 <links>
9907                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9908                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9909                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9910                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9911                 </links>
9912         </class>
9913
9914         <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">
9915                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9916                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9917                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9918                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9919                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9920                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9921                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9922                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9923                 </fields>
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 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">
9933                 <fields oils_persist:primary="ptype_key">
9934                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9935                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9936                 </fields>
9937                 <links/>
9938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9939                         <actions>
9940                                 <retrieve/>
9941                         </actions>
9942                 </permacrud>
9943         </class>
9944
9945         <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">
9946                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9947                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9948                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9949                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9950                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9951                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9952                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9953                 </fields>
9954                 <links>
9955                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9956                 </links>
9957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9958                         <actions>
9959                                 <retrieve/>
9960                         </actions>
9961                 </permacrud>
9962         </class>
9963
9964         <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">
9965                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9966                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9967                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9968                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9969                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9970                 </fields>
9971                 <links>
9972                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9973                 </links>
9974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9975                         <actions>
9976                                 <retrieve/>
9977                         </actions>
9978                 </permacrud>
9979         </class>
9980
9981     <class
9982         id="uvs"
9983         controller="open-ils.cstore open-ils.pcrud"
9984         oils_obj:fieldmapper="url_verify::session"
9985         oils_persist:tablename="url_verify.session"
9986         reporter:label="URL Verification Session"
9987     >
9988         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9989             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9990             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9991                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9992             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9993             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9994             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9995             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9996             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9997             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9998         </fields>
9999
10000         <links>
10001             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10002             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10003             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10004             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10005             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10006         </links>
10007
10008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10009             <actions>
10010                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10011             </actions>
10012         </permacrud>
10013
10014     </class>
10015
10016     <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">
10017         <oils_persist:source_definition>
10018             SELECT
10019                 cbrebi.id AS id,  -- so we can have a pkey in our view
10020                 uvs.id AS session,
10021                 uvs.owning_lib,
10022                 cbrebi.target_biblio_record_entry
10023             FROM url_verify.session uvs
10024             JOIN container.biblio_record_entry_bucket cbreb
10025                 ON (uvs.container = cbreb.id)
10026             JOIN container.biblio_record_entry_bucket_item cbrebi
10027                 ON (cbrebi.bucket = cbreb.id)
10028         </oils_persist:source_definition>
10029         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10030             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10031             <field reporter:label="Session" name="session" reporter:datatype="link" />
10032             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10033             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10034         </fields>
10035         <links>
10036             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10037             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10038             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10039         </links>
10040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10041             <actions>
10042                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10043             </actions>
10044         </permacrud>
10045     </class>
10046
10047     <class
10048         id="uvus"
10049         controller="open-ils.cstore open-ils.pcrud"
10050         oils_obj:fieldmapper="url_verify::url_selector"
10051         oils_persist:tablename="url_verify.url_selector"
10052         reporter:label="URL Verification URL Selector"
10053     >
10054         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10055             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10056             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10057                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10058             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10059         </fields>
10060
10061         <links>
10062             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10063             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10064         </links>
10065
10066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10067             <actions>
10068                 <create permission="URL_VERIFY">
10069                     <context link="session" field="owning_lib"/>
10070                 </create>
10071                 <retrieve permission="URL_VERIFY">
10072                     <context link="session" field="owning_lib"/>
10073                 </retrieve>
10074                 <update permission="URL_VERIFY">
10075                     <context link="session" field="owning_lib"/>
10076                 </update>
10077                 <delete permission="URL_VERIFY">
10078                     <context link="session" field="owning_lib"/>
10079                 </delete>
10080             </actions>
10081         </permacrud>
10082
10083     </class>
10084
10085     <class
10086         id="uvu"
10087         controller="open-ils.cstore open-ils.pcrud"
10088         oils_obj:fieldmapper="url_verify::url"
10089         oils_persist:tablename="url_verify.url"
10090         reporter:label="URL Verification URL"
10091     >
10092         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10093             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10094                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10095                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10096                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10097                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10098             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10099             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10100             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10101             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10102             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10103             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10104             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10105             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10106             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10107             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10108             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10109             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10110             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10111         </fields>
10112
10113         <links>
10114             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10115             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10116             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10117             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10118             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10119         </links>
10120
10121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10122             <actions>
10123                 <create permission="URL_VERIFY">
10124                     <context link="session" field="owning_lib"/>
10125                 </create>
10126                 <retrieve permission="URL_VERIFY">
10127                     <context link="session" field="owning_lib"/>
10128                 </retrieve>
10129                 <update permission="URL_VERIFY">
10130                     <context link="session" field="owning_lib"/>
10131                 </update>
10132                 <delete permission="URL_VERIFY">
10133                     <context link="session" field="owning_lib"/>
10134                 </delete>
10135             </actions>
10136         </permacrud>
10137
10138     </class>
10139
10140     <class
10141         id="uvva"
10142         controller="open-ils.cstore open-ils.pcrud"
10143         oils_obj:fieldmapper="url_verify::verification_attempt"
10144         oils_persist:tablename="url_verify.verification_attempt"
10145         reporter:label="URL Verification Attempt"
10146     >
10147         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10148             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10149                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10150                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10151             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10152             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10153         </fields>
10154
10155         <links>
10156             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10157             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10158         </links>
10159
10160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10161             <actions>
10162                 <create permission="URL_VERIFY">
10163                     <context link="session" field="owning_lib"/>
10164                 </create>
10165                 <retrieve permission="URL_VERIFY">
10166                     <context link="session" field="owning_lib"/>
10167                 </retrieve>
10168                 <update permission="URL_VERIFY">
10169                     <context link="session" field="owning_lib"/>
10170                 </update>
10171                 <delete permission="URL_VERIFY">
10172                     <context link="session" field="owning_lib"/>
10173                 </delete>
10174             </actions>
10175         </permacrud>
10176
10177     </class>
10178
10179     <class
10180         id="uvuv"
10181         controller="open-ils.cstore open-ils.pcrud"
10182         oils_obj:fieldmapper="url_verify::url_verification"
10183         oils_persist:tablename="url_verify.url_verification"
10184         reporter:label="URL Verification"
10185     >
10186         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10187             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10188                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10189                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10190             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10191             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10192             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10193             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10194                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10195         </fields>
10196
10197         <links>
10198             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10199             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10200             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10201         </links>
10202
10203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10204             <actions>
10205                 <create permission="URL_VERIFY">
10206                     <context link="attempt" jump="session" field="owning_lib"/>
10207                 </create>
10208                 <retrieve permission="URL_VERIFY">
10209                     <context link="attempt" jump="session" field="owning_lib"/>
10210                 </retrieve>
10211                 <update permission="URL_VERIFY">
10212                     <context link="attempt" jump="session" field="owning_lib"/>
10213                 </update>
10214                 <delete permission="URL_VERIFY">
10215                     <context link="attempt" jump="session" field="owning_lib"/>
10216                 </delete>
10217             </actions>
10218         </permacrud>
10219
10220     </class>
10221
10222         <class
10223                 id="cfdi"
10224                 controller="open-ils.cstore open-ils.pcrud"
10225                 oils_obj:fieldmapper="config::filter_dialog_interface"
10226                 oils_persist:tablename="config.filter_dialog_interface"
10227                 reporter:label="FilterDialog Interface">
10228                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10229                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10230                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10231                 </fields>
10232                 <links>
10233                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10234                 </links>
10235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10236                         <actions>
10237                                 <retrieve />
10238                         </actions>
10239                 </permacrud>
10240         </class>
10241
10242         <class
10243                 id="cfdfs"
10244                 controller="open-ils.cstore open-ils.pcrud"
10245                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10246                 oils_persist:tablename="config.filter_dialog_filter_set"
10247                 reporter:label="FilterDialog Filter Set">
10248                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10249                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10250                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10251                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10252                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10253                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10254                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10255                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10256                 </fields>
10257                 <links>
10258                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10260                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10261                 </links>
10262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10263                         <actions>
10264                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10265                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10266                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10267                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10268                         </actions>
10269                 </permacrud>
10270
10271         </class>
10272
10273         <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">
10274                 <fields oils_persist:primary="code">
10275                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10276                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10277                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10278                 </fields>
10279                 <links/>
10280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10281                         <actions>
10282                                 <retrieve/>
10283                         </actions>
10284                 </permacrud>
10285         </class>
10286
10287         <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">
10288                 <oils_persist:source_definition>
10289
10290             SELECT  b.id,
10291                     MAX(dcp.edit_date) AS last_delete_date
10292              FROM   biblio.record_entry b
10293                     JOIN asset.call_number cn ON (cn.record = b.id)
10294                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10295              WHERE  NOT b.deleted
10296              GROUP BY b.id
10297              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10298
10299                 </oils_persist:source_definition>
10300                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10301                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10302                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10303                 </fields>
10304                 <links>
10305                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10306                 </links>
10307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10308                         <actions>
10309                                 <retrieve/>
10310                         </actions>
10311                 </permacrud>
10312         </class>
10313
10314         <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">
10315                 <oils_persist:source_definition>
10316
10317             -- -- 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.
10318             -- -- 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
10319             -- -- may not.
10320             -- SELECT
10321             --     bre.id AS "bib_id",
10322             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10323             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10324             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10325             -- FROM (
10326                 SELECT
10327                     y.bre AS "id",
10328                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10329                     y.hold_count AS "hold_count",
10330                     (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"
10331                 FROM (
10332                         SELECT
10333                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10334                             COUNT(*) AS "hold_count"
10335                         FROM action.hold_request h
10336                         WHERE
10337                             cancel_time IS NULL
10338                             AND fulfillment_time IS NULL
10339                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10340                         GROUP BY 1
10341                     )y LEFT JOIN (
10342                         SELECT 
10343                             (SELECT id
10344                                 FROM biblio.record_entry 
10345                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10346                             ) AS "bre", 
10347                             COUNT(*) AS "copy_count"
10348                         FROM asset.copy
10349                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10350                         WHERE copy.holdable 
10351                             AND NOT copy.deleted 
10352                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10353                         GROUP BY 1
10354                     )x ON x.bre = y.bre
10355                 -- )z RIGHT JOIN (
10356                 --     SELECT id
10357                 --     FROM biblio.record_entry
10358                 --     WHERE NOT deleted
10359                 -- )bre ON (z.bib_id = bre.id)
10360                 
10361
10362                 </oils_persist:source_definition>
10363                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10364                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10365                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10366                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10367                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10368                 </fields>
10369                 <links>
10370                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10371                 </links>
10372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10373                         <actions>
10374                                 <retrieve/>
10375                         </actions>
10376                 </permacrud>
10377         </class>
10378
10379         <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">
10380                 <oils_persist:source_definition>
10381             SELECT *,
10382                 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,
10383                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10384             FROM
10385                 (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
10386                     FROM
10387                         action.hold_request ahr
10388                         JOIN reporter.hold_request_record rhrr USING (id)
10389                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10390                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10391                     WHERE
10392                         ahr.cancel_time IS NULL
10393                         AND ahr.fulfillment_time IS NULL
10394                     GROUP BY bib_record, pickup_lib
10395                 )x
10396                 JOIN
10397                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10398                     FROM
10399                         action.hold_request ahr
10400                         JOIN reporter.hold_request_record rhrr USING (id)
10401                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10402                     WHERE
10403                         ahr.cancel_time IS NULL
10404                         AND ahr.fulfillment_time IS NULL
10405                     GROUP BY bib_record
10406                 )y
10407                 USING (id)
10408                 </oils_persist:source_definition>
10409                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10410                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10411                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10412                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10413                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10414                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10415                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10416                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10417                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10418                 </fields>
10419                 <links>
10420                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10421                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10422                 </links>
10423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10424                         <actions>
10425                                 <retrieve/>
10426                         </actions>
10427                 </permacrud>
10428         </class>
10429
10430         <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">
10431                 <oils_persist:source_definition>
10432             SELECT
10433                 ac.id,
10434                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10435                 MAX(actac.xact_start) AS last_circ
10436             FROM asset.copy ac
10437                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10438             GROUP BY ac.id
10439
10440             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10441             --SELECT
10442             --    ac.id,
10443             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10444             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10445             --FROM asset.copy ac
10446             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10447             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10448             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10449                 </oils_persist:source_definition>
10450                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10451                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10452                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10453                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10454                 </fields>
10455                 <links>
10456                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10457                 </links>
10458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10459                         <actions>
10460                                 <retrieve/>
10461                         </actions>
10462                 </permacrud>
10463         </class>
10464
10465         <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">
10466                 <fields oils_persist:primary="id">
10467                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10468                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10469                 </fields>
10470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10471                         <actions>
10472                                 <retrieve/>
10473                         </actions>
10474                 </permacrud>
10475         </class>
10476
10477         <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">
10478                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10479                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10480                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10481                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10482                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10483                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10484                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10485                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10486                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10487                 </fields>
10488                 <links>
10489                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10490                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10491                 </links>
10492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10493                         <actions>
10494                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10495                                 <retrieve/>
10496                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10497                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10498                         </actions>
10499                 </permacrud>
10500         </class>
10501
10502         <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">
10503                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10504                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10505                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10506                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10507                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10508                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10509                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10510                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10511                 </fields>
10512                 <links>
10513                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10514                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10515                 </links>
10516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10517                         <actions>
10518                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10519                                 <retrieve/>
10520                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10521                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10522                         </actions>
10523                 </permacrud>
10524         </class>
10525
10526
10527         <!-- ********************************************************************************************************************* -->
10528         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10529         <!-- ********************************************************************************************************************* -->
10530         <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">
10531                 <fields oils_persist:primary="id">
10532                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10533                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10534                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10535                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10536                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10537                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10538                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10539                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10540                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10541                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10542                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10543                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10544                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10545                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10546                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10547                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10548                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10549                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10550                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10551                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10552                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10553                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10554                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10555                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10556                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10557                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10558                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10559                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10560                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10561                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10562                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10563                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10564                 </fields>
10565                 <links>
10566                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10567                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10568                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10569                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10570                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10571                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10572                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10573                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10574                 </links>
10575         </class>
10576
10577         <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">
10578                 <fields oils_persist:primary="id">
10579                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10580                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10581                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10582                 </fields>
10583                 <links>
10584                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10585                 </links>
10586         </class>
10587
10588         <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">
10589                 <fields oils_persist:primary="id">
10590                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10591                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10592                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10593                 </fields>
10594                 <links>
10595                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10596                 </links>
10597         </class>
10598
10599         <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">
10600                 <fields oils_persist:primary="id">
10601                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10602
10603                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10604                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10605                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10606
10607                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10608                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10609                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10610
10611                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10612                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10613
10614                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10615                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10616                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10617
10618                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10619                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10620
10621                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10622                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10623                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10624
10625                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10626                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10627                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10628
10629                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10630                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10631                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10632                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10633
10634                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10635                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10636
10637                 </fields>
10638                 <links>
10639                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10640                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10641                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10642                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10643                 </links>
10644         </class>
10645
10646         <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">
10647                 <oils_persist:source_definition>
10648
10649             SELECT
10650                 po.ordering_agency AS ordering_agency,
10651                 po.id AS purchase_order,
10652                 li.id AS lineitem,
10653                 lid.id AS lineitem_detail,
10654                 cpa.id AS claim_policy_action
10655             FROM
10656                 acq.lineitem_detail lid
10657                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10658                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10659                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10660                 JOIN acq.claim_policy_action cpa ON (
10661                     cpa.claim_policy = cp.id
10662
10663                     -- we only care about claim policy actions whose claim
10664                     -- interval we'd reached or exceeded
10665                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10666
10667                     -- filter out all claim policy actions where claim events
10668                     -- have occurred on or after the action's action_interval
10669                     AND NOT EXISTS (
10670                         SELECT 1
10671                         FROM
10672                             acq.claim_event evt
10673                             JOIN acq.claim claim ON (
10674                                 claim.id = evt.claim
10675                                 AND claim.lineitem_detail = lid.id
10676                             )
10677                         WHERE
10678                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10679                     )
10680                 )
10681             WHERE
10682                 lid.cancel_reason IS NULL
10683                 AND li.cancel_reason IS NULL -- belt/suspenders
10684                 AND po.cancel_reason IS NULL -- belt/suspenders
10685                 AND lid.recv_time IS NULL
10686                 AND po.state = 'on-order'
10687             ORDER BY 1, 2, 3, 4, 5
10688
10689                 </oils_persist:source_definition>
10690                 <fields>
10691                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10692                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10693                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10694                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10695                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10696                 </fields>
10697                 <links>
10698                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10699                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10700                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10701                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10702                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10703                 </links>
10704         </class>
10705         <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">
10706                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10707                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10708                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10709                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10710                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10711                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10712                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10713                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10714                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10715                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10716                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10717                 </fields>
10718                 <links>
10719                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10720                 </links>
10721     </class>
10722         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10723                 <oils_persist:source_definition>
10724             SELECT * FROM acq.lineitem_summary 
10725                                 WHERE item_count > (invoice_count + cancel_count)
10726         </oils_persist:source_definition>
10727                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10728                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10729                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10730                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10731                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10732                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10733                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10734                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10735                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10736                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10737                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10738                 </fields>
10739                 <links>
10740                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10741                 </links>
10742     </class>
10743         <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">
10744                 <oils_persist:source_definition>
10745
10746                         SELECT  t.*
10747                           FROM  action.transit_copy t
10748                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10749                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10750                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10751
10752                 </oils_persist:source_definition>
10753                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10754                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10755                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10756                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10757                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10758                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10759                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10760                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10761                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10762                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10763                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10764                 </fields>
10765                 <links>
10766                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10767                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10768                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10769                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10770                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10771                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10772                 </links>
10773         </class>
10774
10775     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10776                 <oils_persist:source_definition>
10777
10778         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10779                 SELECT
10780                         cp.id as copy,
10781                         COUNT(circ.id),
10782                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10783                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10784                 FROM
10785                         asset.copy cp
10786                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10787                 GROUP BY 1, 3, 4
10788                 UNION ALL
10789                 SELECT
10790                         cp.id as copy,
10791                         COUNT(circ.id),
10792                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10793                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10794                 FROM
10795                         asset.copy cp
10796                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10797                 GROUP BY 1, 3, 4
10798                 UNION ALL
10799                 SELECT
10800                         id as copy,
10801                         circ_count,
10802                         -1 AS year,
10803                         false as is_renewal
10804                 FROM
10805                         extend_reporter.legacy_circ_count
10806         )x GROUP BY 1, 3, 4
10807
10808                 </oils_persist:source_definition>
10809         <fields>
10810             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10811             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10812             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10813             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10814         </fields>
10815                 <links>
10816                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10817                 </links>
10818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10819                         <actions>
10820                                 <retrieve/>
10821                         </actions>
10822                 </permacrud>
10823     </class>
10824
10825         <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">
10826                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10827                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10828                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10829                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10830                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10831                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10832                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10833                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10834                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10835                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10836                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10837                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10838                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10839                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10840                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10841                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10842                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10843                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10844                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10845                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10846                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10847                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10848                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10849                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10850                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10851                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10852                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10853                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10854                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10855                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10856                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10857                 </fields>
10858                 <links>
10859                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10860                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10861                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10862                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10863                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10864                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10865                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10866                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10867                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10868                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10869                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10870                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10871                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10872                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10873                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10874                 </links>
10875         </class>
10876
10877     <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">
10878         <fields oils_persist:primary="id">
10879             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10880             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10881             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10882             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10883             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10884             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10885             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10886             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10887             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10888             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10889             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10890             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10891             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
10892             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
10893             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10894             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10895             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10896             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10897             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10898             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10899             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10900             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10901             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10902             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10903             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10904             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10905             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10906             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10907             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10908             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10909             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10910             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10911             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10912             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10913         </fields>
10914         <links>
10915             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10916             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10917             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10918             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10919             <link field="age_protect" reltype="might_have" key="id" map="" class="crahp"/>
10920             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10921             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
10922             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
10923         </links>
10924     </class>
10925
10926     <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">
10927         <fields oils_persist:primary="id">
10928             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10929             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10930             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10931             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10932         </fields>
10933         <links>
10934             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10935             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10936         </links>
10937     </class>
10938
10939     <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">
10940         <fields oils_persist:primary="owning_lib">
10941             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10942             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10943             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10944         </fields>
10945         <links>
10946             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10947         </links>
10948     </class>
10949
10950     <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">
10951         <fields oils_persist:primary="id">
10952             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10953             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10954             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10955             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10956             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10957         </fields>
10958         <links>
10959             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10960             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10961             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10962         </links>
10963     </class>
10964
10965     <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">
10966         <fields oils_persist:primary="circ_lib">
10967             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10968             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10969             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10970             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10971         </fields>
10972         <links>
10973             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10974             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10975         </links>
10976     </class>
10977
10978     <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">
10979         <fields oils_persist:primary="id">
10980             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10981             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10982             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10983             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10984             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10985         </fields>
10986         <links>
10987             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10988             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10989             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10990         </links>
10991     </class>
10992
10993     <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">
10994         <fields oils_persist:primary="home_ou">
10995             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10996             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10997             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10998             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10999         </fields>
11000         <links>
11001             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11002             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11003         </links>
11004     </class>
11005         <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">
11006                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11007                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11008                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11009                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11010                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11011                 </fields>
11012                 <links>
11013                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11014                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11015                 </links>
11016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11017                         <actions>
11018                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11019                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11020                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11021                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11022                         </actions>
11023                 </permacrud>
11024         </class>
11025         <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">
11026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11027                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11028                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11029                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11030                 </fields>
11031                 <links>
11032                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11033                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11034                         </links>
11035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11036                 <actions>
11037                                 <create permission="ADMIN_ACQ_FUND_TAG">
11038                                         <context link="tag" field="owner"/>
11039                                 </create>
11040                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11041                                         <context link="tag" field="owner"/>
11042                                 </retrieve>
11043                                 <update permission="ADMIN_ACQ_FUND_TAG">
11044                                         <context link="tag" field="owner"/>
11045                                 </update>
11046                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11047                                         <context link="tag" field="owner"/>
11048                                 </delete>
11049                         </actions>
11050                 </permacrud>
11051         </class>
11052         <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">
11053                 <oils_persist:source_definition><![CDATA[
11054                 SELECT
11055                         poi.purchase_order AS purchase_order,
11056                         ii.invoice AS invoice,
11057                         NULL AS lineitem,
11058                         poi.id AS po_item,
11059                         NULL AS picklist
11060                 FROM
11061                         acq.po_item poi
11062                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11063                 UNION SELECT
11064                         jub.purchase_order AS purchase_order,
11065                         ie.invoice AS invoice,
11066                         jub.id AS lineitem,
11067                         NULL AS po_item,
11068                         jub.picklist AS picklist
11069                 FROM
11070                         acq.lineitem jub
11071                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11072                 UNION SELECT
11073                         ii.purchase_order AS purchase_order,
11074                         ii.invoice AS invoice,
11075                         NULL AS lineitem,
11076                         NULL AS po_item,
11077                         NULL AS picklist
11078                 FROM
11079                         acq.invoice_item ii
11080                 WHERE ii.po_item IS NULL
11081                 UNION SELECT
11082                         ie.purchase_order AS purchase_order,
11083                         ie.invoice AS invoice,
11084                         NULL AS lineitem,
11085                         NULL AS po_item,
11086                         NULL AS picklist
11087                 FROM
11088                         acq.invoice_entry ie
11089                 WHERE ie.lineitem IS NULL
11090                 UNION SELECT
11091                         NULL AS purchase_order,
11092                         NULL AS invoice,
11093                         jub.id AS lineitem,
11094                         NULL AS po_item,
11095                         jub.picklist AS picklist
11096                 FROM
11097                         acq.lineitem jub
11098                 WHERE jub.purchase_order IS NULL
11099                 ]]></oils_persist:source_definition>
11100                 <fields>
11101                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11102                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11103                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11104                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11105                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11106                 </fields>
11107                 <links>
11108                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11109                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11110                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11111                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11112                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11113                 </links>
11114         </class>
11115         <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">
11116                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11117                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11118                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11119                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11120                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11121                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11122                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11123                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11124                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11125                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11126                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11127                 </fields>
11128                 <links>
11129                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11130                 </links>
11131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11132                         <actions>
11133                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11134                                 <retrieve/>
11135                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11136                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11137                         </actions>
11138                 </permacrud>
11139         </class>
11140
11141         <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">
11142                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11143                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11144                         <field name="date_applied" reporter:datatype="timestamp"/>
11145                         <field name="org" reporter:datatype="org_unit"/>
11146                         <field name="original_value" reporter:datatype="text"/>
11147                         <field name="new_value" reporter:datatype="text"/>
11148                         <field name="field_name" reporter:datatype="link"/>
11149                 </fields>
11150                 <links>
11151                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11152                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11153                 </links>
11154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11155                         <actions>
11156                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11157                                 <retrieve/>
11158                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11159                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11160                         </actions>
11161                 </permacrud>
11162         </class>
11163         <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">
11164                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11166                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11167                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11168                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11169                 </fields>
11170                 <links>
11171                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11172                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11173                 </links>
11174         </class>
11175         <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">
11176                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11177                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11178                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11179                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11180                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11181                 </fields>
11182                 <links>
11183                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11184                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11185                 </links>
11186         </class>
11187         <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">
11188                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11189                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11190                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11191                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11192                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11193                 </fields>
11194                 <links>
11195                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11196                 </links>
11197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11198                         <actions>
11199                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11200                                 <retrieve/>
11201                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11202                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11203                         </actions>
11204                 </permacrud>
11205         </class>
11206         <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">
11207                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11208                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11209                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11210                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11211                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11212                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11213                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11214                 </fields>
11215                 <links>
11216                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11217                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11218                 </links>
11219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11220                         <actions>
11221                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11222                                 <retrieve/>
11223                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11224                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11225                         </actions>
11226                 </permacrud>
11227         </class>
11228
11229         <!-- ********************************************************************************************************************* -->
11230
11231 </IDL>
11232
11233 <!--
11234     vim:noet:ts=4:sw=4:
11235 -->