]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Vandelay record bucket-limited matching
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </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"/>
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 permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </retrieve>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="vibtg" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
246             oils_persist:tablename="vandelay.import_bib_trash_group" 
247             reporter:label="Import/Overlay Field Groups for Removal">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
252                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
253                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
254                 </fields>
255                 <links>
256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
257                 </links>
258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
259                         <actions>
260                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268
269         <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">
270                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
271                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
272                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
273                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
274                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
275                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
276                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
277                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
278                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
279                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
280                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
281                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
282                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
283                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
284                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
286                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
287                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
288                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
289                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
290                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
291                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
292                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
293                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
294                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
295                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
296                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
297                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                 </fields>
351                 <links>
352                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <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"/>
358                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
359                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
366                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
367                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
369                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
370                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
371                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
372                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
373                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
374                 </fields>
375                 <links>
376                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
377                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
378                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
379                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
380                 </links>
381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
382                         <actions>
383                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
387                         </actions>
388                 </permacrud>
389         </class>
390
391         <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">
392                 <fields oils_persist:primary="code">
393                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
395                 </fields>
396                 <links>
397                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
398                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
399                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
400                 </links>
401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
402                         <actions>
403                                 <retrieve/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
410                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
414                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
415                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
416                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
417                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
418                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
419                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
420                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
424                 </fields>
425                 <links>
426                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
427                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
428                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
429                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
430             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
431             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
432             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
433                 </links>
434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
435                         <actions>
436                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
440                         </actions>
441                 </permacrud>
442         </class>
443
444         <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">
445                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
446                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
447                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
448                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
449                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
450                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
451                 </fields>
452                 <links/>
453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
454                         <actions>
455                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
456                 <retrieve/>
457                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
458                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                         </actions>
460                 </permacrud>
461         </class>
462
463         <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">
464                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
465                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
466                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
467                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
468                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
469                 </fields>
470                 <links>
471                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
472                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
473                 </links>
474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
475                         <actions>
476                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                         </actions>
481                 </permacrud>
482         </class>
483
484         <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">
485                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
486                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
487                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
488                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
489                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
490                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
491                 </fields>
492                 <links>
493                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
494                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
508                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
509                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
510                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
511                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
512                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
513                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
514                 </fields>
515                 <links>
516                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
517                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
518                 </links>
519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
520                         <actions>
521                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                         </actions>
526                 </permacrud>
527         </class>
528
529         <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">
530                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
531                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
532                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
533                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
535                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
536                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
537                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
538                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
539                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
540                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
541                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
543                 </fields>
544                 <links>
545                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
546                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
547                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
548             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
549             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
550                 </links>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
563                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
565                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
566                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
567                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
568                 </fields>
569                 <links/>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                 <retrieve/>
574                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
575                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                         </actions>
577                 </permacrud>
578         </class>
579
580         <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">
581                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
582                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
583                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
584                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
585                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
589                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <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">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
603                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
604                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
605                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
606                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
607                 </fields>
608                 <links>
609                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
610                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
611                 </links>
612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
613                         <actions>
614                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
624                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
625                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
626                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
627                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
628                 </fields>
629                 <links>
630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
631                 </links>
632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
633                         <actions>
634                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
636                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
638                         </actions>
639                 </permacrud>
640         </class>
641
642         <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">
643                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
644                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
645                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
646                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
647                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
648                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
649                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
650                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
651             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
652                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
653                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
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="Filter?" name="filter" reporter:datatype="bool"/>
790                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
791                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
792                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
793                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
794                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
795                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
796                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
797                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
798                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
799                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
800                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
801                 </fields>
802                 <links>
803                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
804                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
805                 </links>
806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
807             <actions>
808                 <create permission="ADMIN_SVF" global_required="true"/>
809                 <retrieve/>
810                 <update permission="ADMIN_SVF" global_required="true"/>
811                 <delete permission="ADMIN_SVF" global_required="true"/>
812             </actions>
813         </permacrud>
814         </class>
815
816         <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">
817                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
819                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
820                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
821             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
822                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
823                 </fields>
824                 <links/>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <retrieve/>
829                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
830                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
831             </actions>
832         </permacrud>
833         </class>
834
835         <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">
836                 <fields oils_persist:primary="id">
837                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
838                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
839                 </fields>
840                 <links>
841                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
842                 </links>
843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
844             <actions>
845                 <retrieve/>
846             </actions>
847         </permacrud>
848         </class>
849
850         <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">
851                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
852                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
853                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
854                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
855                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
856                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
857                 </fields>
858                 <links>
859                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
860                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
861                 </links>
862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
863             <actions>
864                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <retrieve/>
866                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
867                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
868             </actions>
869         </permacrud>
870         </class>
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
874                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
875                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
876                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
877                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
880                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
881             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
882                 </fields>
883                 <links>
884                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
885                 </links>
886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887             <actions>
888                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <retrieve/>
890                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
891                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
892             </actions>
893         </permacrud>
894         </class>
895
896         <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">
897                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
898                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
899                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
900                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
901                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
902                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
903                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
904                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
905                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
906                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
907                 </fields>
908                 <links>
909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
910                 </links>
911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
912             <actions>
913                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
916                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
917             </actions>
918         </permacrud>
919         </class>
920
921     <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">
922         <fields oils_persist:primary="name">
923             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
924             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
925             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
926             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
927             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
928             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
929             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
930             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
931             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
932             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
933         </fields>
934         <links>
935             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
936             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
937         </links>
938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939             <actions>
940                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <retrieve/>
942                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
943                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
944             </actions>
945         </permacrud>
946     </class>
947
948     <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">
949         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
950             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
951             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
952             <field reporter:label="Name" name="name" reporter:datatype="text"/>
953             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
954             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
955             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
956             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
957         </fields>
958         <links>
959             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
960         </links>
961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
962             <actions>
963                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <retrieve/>
965                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
966                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
967             </actions>
968         </permacrud>
969     </class>
970
971     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
972                         oils_obj:fieldmapper="config::z3950_index_field_map" 
973                         oils_persist:tablename="config.z3950_index_field_map" 
974                         reporter:label="Z39.50 Index Field Map">
975         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
976             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
977             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
978             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
979             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
980             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
981             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
982         </fields>
983         <links>
984             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
985             <link field="record_attr" reltype="has_a" key="id" map="" class="crad"/>
986             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
987         </links>
988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989             <actions>
990                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
991                 <retrieve/>
992                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
993                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
994             </actions>
995         </permacrud>
996     </class>
997
998
999         <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">
1000                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1001                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1002                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1003                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1004                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1005                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1006                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1007                 </fields>
1008                 <links>
1009             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1010             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1011                 </links>
1012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1013                         <actions>
1014                                 <retrieve/>
1015                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1016                         </actions>
1017                 </permacrud>
1018         </class>
1019
1020         <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">
1021                 <fields oils_persist:primary="key">
1022                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1023                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1024                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1025                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1026                 </fields>
1027                 <links/>
1028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1029                         <actions>
1030                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1031                                 <retrieve/>
1032                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1033                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1034                         </actions>
1035                 </permacrud>
1036         </class>
1037
1038         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1039                 <fields oils_persist:primary="module">
1040                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1041                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1042                 </fields>
1043                 <links/>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="module">
1048                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1049                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1050                 </fields>
1051                 <links/>
1052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053                         <actions>
1054                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1055                                 <retrieve/>
1056                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1057                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1058                         </actions>
1059                 </permacrud>
1060         </class>
1061
1062         <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">
1063                 <fields oils_persist:primary="module">
1064                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1065                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1066                 </fields>
1067                 <links/>
1068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069                         <actions>
1070                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1071                                 <retrieve/>
1072                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1073                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1074                         </actions>
1075                 </permacrud>
1076         </class>
1077
1078         <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">
1079                 <fields oils_persist:primary="module">
1080                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1081                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1082                 </fields>
1083                 <links/>
1084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085                         <actions>
1086                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1087                                 <retrieve/>
1088                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1089                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1090                         </actions>
1091                 </permacrud>
1092         </class>
1093
1094         <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">
1095                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1096                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1097                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1098                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1099                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1100                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1101                 </fields>
1102                 <links>
1103                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1104                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1105                 </links>
1106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1107                         <actions>
1108                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1109                     <context link="event_def" field="owner"/>
1110                 </create>
1111                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1112                     <context link="event_def" field="owner"/>
1113                 </retrieve>
1114                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1115                     <context link="event_def" field="owner"/>
1116                 </update>
1117                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1118                     <context link="event_def" field="owner"/>
1119                 </delete>
1120                         </actions>
1121                 </permacrud>
1122         </class>
1123
1124         <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">
1125                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1126                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1127                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1128                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1129                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1130                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1131                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1132                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1133                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1134                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1135                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1136                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1137                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1138                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1139                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1140                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1141                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1142                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1143                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1144                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1145                 </fields>
1146                 <links>
1147                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1148                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1149                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1150                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1151                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1152                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1153                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1154                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1155                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1156                 </links>
1157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1158                         <actions>
1159                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1162                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1163                         </actions>
1164                 </permacrud>
1165         </class>
1166
1167         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1168                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1169                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1170                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1171                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1172                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1176                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1177                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1178                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1179                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1180                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1181                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1182                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1183                 </fields>
1184                 <links>
1185                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1186                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1188                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1189                 </links>
1190         </class>
1191
1192         <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">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1194                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1195                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1196                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1197                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1198                 </fields>
1199                 <links>
1200                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1201                 </links>
1202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1203                         <actions>
1204                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1205                     <context link="event_def" field="owner"/>
1206                 </create>
1207                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1208                     <context link="event_def" field="owner"/>
1209                 </retrieve>
1210                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1211                     <context link="event_def" field="owner"/>
1212                 </update>
1213                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1214                     <context link="event_def" field="owner"/>
1215                 </delete>
1216                         </actions>
1217                 </permacrud>
1218         </class>
1219
1220         <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">
1221                 <oils_persist:source_definition><![CDATA[
1222                 SELECT  atevdef.hook,
1223                         atevdef.name,
1224                         atevdef.reactor,
1225                         atev.id,
1226                         atev.event_def,
1227                         atev.add_time,
1228                         atev.run_time,
1229                         atev.start_time,
1230                         atev.update_time,
1231                         atev.complete_time,
1232                         atev.update_process,
1233                         atev.state,
1234                         atev.user_data,
1235                         atev.template_output,
1236                         atev.error_output,
1237                         atev.async_output,
1238                         targ_circ.id AS target_circ,
1239                         targ_ahr.id AS target_hold,
1240                         COALESCE(
1241                                 targ_circ.circ_lib,
1242                                 targ_ahr.pickup_lib
1243                         ) AS perm_lib
1244                 FROM action_trigger.event atev
1245                 JOIN action_trigger.event_definition atevdef ON
1246                         (atevdef.id = atev.event_def)
1247                 JOIN action_trigger.hook ath ON
1248                         (ath.key = atevdef.hook)
1249                 LEFT JOIN action.circulation targ_circ ON
1250                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1251                 LEFT JOIN action.hold_request targ_ahr ON
1252                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1253                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1254                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1255                                 'circ.staff.max_visible_event_age',
1256                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1257                         ) UNION
1258                         SELECT '1000 YEARS'::INTERVAL AS value
1259                 ) ous)
1260                 ]]></oils_persist:source_definition>
1261                 <fields oils_persist:primary="id">
1262                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1263                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1264                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1265                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1266                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1267                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1271                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1272                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1273                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1274                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1275                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1276                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1277                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1278                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1279                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1280                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1281                 </fields>
1282                 <links>
1283                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1284                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1286                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1287                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1288                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1289                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1290                 </links>
1291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292                         <actions>
1293                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1294                         </actions>
1295                 </permacrud>
1296         </class>
1297
1298         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1299                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1300                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1301                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1302                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1303                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1304                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1305                 </fields>
1306                 <links>
1307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1308                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1309                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1310                 </links>
1311         </class>
1312
1313         <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">
1314                 <fields oils_persist:primary="code">
1315                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1316                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1318                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1319                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1320                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1321                 </fields>
1322                 <links/>
1323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1324             <actions>
1325                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1326                 <retrieve/>
1327                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1328                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1329             </actions>
1330         </permacrud>
1331         </class>
1332
1333         <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">
1334                 <fields oils_persist:primary="code">
1335                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1336                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1337                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1338                 </fields>
1339                 <links/>
1340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1341             <actions>
1342                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1343                 <retrieve/>
1344                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1345                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1346             </actions>
1347         </permacrud>
1348         </class>
1349
1350         <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">
1351                 <fields oils_persist:primary="code">
1352                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1353                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1354                 </fields>
1355                 <links/>
1356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1357             <actions>
1358                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1359                 <retrieve/>
1360                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1361                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1362             </actions>
1363         </permacrud>
1364         </class>
1365
1366         <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">
1367                 <fields oils_persist:primary="code">
1368                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1369                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1370                 </fields>
1371                 <links/>
1372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373             <actions>
1374                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1375                 <retrieve/>
1376                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1377                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1378             </actions>
1379         </permacrud>
1380         </class>
1381
1382         <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">
1383                 <fields oils_persist:primary="code">
1384                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1385                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1386                 </fields>
1387                 <links/>
1388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1389             <actions>
1390                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1391                 <retrieve/>
1392                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1393                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1394             </actions>
1395         </permacrud>
1396         </class>
1397
1398         <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">
1399                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1400                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1401                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1402                 </fields>
1403                 <links/>
1404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1405             <actions>
1406                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1407                 <retrieve/>
1408                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1409                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1410             </actions>
1411         </permacrud>
1412         </class>
1413
1414         <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">
1415                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1416                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1417                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1418                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1419                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1420                 </fields>
1421         <links>
1422             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1423             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1424             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1425         </links>
1426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1427             <actions>
1428                 <create permission="UPDATE_COPY">
1429                     <context link="target_copy" field="circ_lib"/>
1430                 </create>
1431                 <retrieve/>
1432                 <update permission="UPDATE_COPY">
1433                     <context link="target_copy" field="circ_lib"/>
1434                 </update>
1435                 <delete permission="UPDATE_COPY">
1436                     <context link="target_copy" field="circ_lib"/>
1437                 </delete>
1438             </actions>
1439         </permacrud>
1440         </class>
1441
1442         <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">
1443                 <fields oils_persist:primary="code">
1444                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1445                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1446                 </fields>
1447                 <links/>
1448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1449             <actions>
1450                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1451                 <retrieve/>
1452                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1453                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1454             </actions>
1455         </permacrud>
1456         </class>
1457
1458         <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">
1459                 <fields oils_persist:primary="code">
1460                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1461                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1462                 </fields>
1463                 <links/>
1464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1465             <actions>
1466                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1467                 <retrieve/>
1468                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1469                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1470             </actions>
1471         </permacrud>
1472         </class>
1473
1474         <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">
1475                 <fields oils_persist:primary="code">
1476                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1477                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1478                 </fields>
1479                 <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1485                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488         </class>
1489
1490     <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">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1492             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1493             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1494             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1495             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1496             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1497             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1498             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1499             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1500             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1501             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1506             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1507             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1508             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1509         </fields>
1510         <links/>
1511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512             <actions>
1513                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1514                 <retrieve/>
1515                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1516                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1517             </actions>
1518         </permacrud>
1519     </class>
1520
1521     <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">
1522         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1523             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1524             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1525             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1526             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1527             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1528             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1529             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1530             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1531             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1532             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1533             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1534             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1535             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1536             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1537             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1538             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1539             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1540             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1541             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1542         </fields>
1543         <links/>
1544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1545             <actions>
1546                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1547                 <retrieve/>
1548                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1549                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1550             </actions>
1551         </permacrud>
1552     </class>
1553
1554     <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">
1555         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1556             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1557             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1558             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1559             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1560             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1561         </fields>
1562         <links>
1563             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1564             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1565             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1566         </links>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1572                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1573             </actions>
1574         </permacrud>
1575     </class>
1576
1577         <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">
1578                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1579                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1580                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1581                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1582                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1586                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1587                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1588                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1589                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1593                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1594                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1595             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1596                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1597                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1598                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1599                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1600                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1601                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1602                 </fields>
1603                 <links>
1604                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1608                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1609                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1610                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1611                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1612                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1613                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1614                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1615                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1616                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1617             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1618                 </links>
1619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1620             <actions>
1621                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1624                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1625             </actions>
1626         </permacrud>
1627         </class>
1628
1629         <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">
1630                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1631                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1632                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1633                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1634                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1635                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1636                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1637                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1638                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1639                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1640                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1644                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1645                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1646             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1647                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1648                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1649             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1650                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1651                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1652                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1653                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1654             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1655             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1656             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1657                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1658                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1659                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1660                 </fields>
1661                 <links>
1662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1665                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1666                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1667                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1668                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1669                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1670                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1671                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1672                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1673                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1674                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1675                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1676             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1677                 </links>
1678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1679             <actions>
1680                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1683                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1684             </actions>
1685         </permacrud>
1686         </class>
1687
1688     <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">
1689         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1690             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1691             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1692             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1693         </fields>
1694         <links/>
1695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1696             <actions>
1697                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1698                 <retrieve/>
1699                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1700                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1701             </actions>
1702         </permacrud>
1703     </class>
1704
1705     <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">
1706         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1707             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1708             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1709             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1710             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1711             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1712             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1713             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1714         </fields>
1715         <links>
1716             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1717         </links>
1718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1719             <actions>
1720                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1721                 <retrieve/>
1722                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1723                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1724             </actions>
1725         </permacrud>
1726     </class>
1727
1728     <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">
1729         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1730             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1731             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1732             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1733             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1734             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1735         </fields>
1736         <links>
1737             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1738             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1739         </links>
1740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1741             <actions>
1742                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1743                     <context link="matchpoint" field="org_unit"/>
1744                 </create>
1745                 <retrieve/>
1746                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1747                     <context link="matchpoint" field="org_unit"/>
1748                 </update>
1749                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1750                     <context link="matchpoint" field="org_unit"/>
1751                 </delete>
1752             </actions>
1753         </permacrud>
1754     </class>
1755
1756     <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">
1757         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1758             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1759             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1760             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1761         </fields>
1762         <links>
1763             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1764             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1765         </links>
1766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1767             <actions>
1768                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1769                     <context link="limit_set" field="owning_lib"/>
1770                 </create>
1771                 <retrieve/>
1772                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1773                     <context link="limit_set" field="owning_lib"/>
1774                 </update>
1775                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1776                     <context link="limit_set" field="owning_lib"/>
1777                 </delete>
1778             </actions>
1779         </permacrud>
1780     </class>
1781     <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">
1782         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1783             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1784             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1785             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1786         </fields>
1787         <links>
1788             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1789             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1790         </links>
1791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1792             <actions>
1793                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1794                     <context link="limit_set" field="owning_lib"/>
1795                 </create>
1796                 <retrieve/>
1797                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1798                     <context link="limit_set" field="owning_lib"/>
1799                 </update>
1800                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1801                     <context link="limit_set" field="owning_lib"/>
1802                 </delete>
1803             </actions>
1804         </permacrud>
1805     </class>
1806
1807     <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">
1808         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1809             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1810             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1811             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1812             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1813         </fields>
1814         <links>
1815             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1816             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1817         </links>
1818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1819             <actions>
1820                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1821                     <context link="limit_set" field="owning_lib"/>
1822                 </create>
1823                 <retrieve/>
1824                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1825                     <context link="limit_set" field="owning_lib"/>
1826                 </update>
1827                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1828                     <context link="limit_set" field="owning_lib"/>
1829                 </delete>
1830             </actions>
1831         </permacrud>
1832     </class>
1833
1834         <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">
1835                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1836                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1837                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1838                 </fields>
1839                 <links/>
1840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1841             <actions>
1842                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1843                 <retrieve/>
1844                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1845                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1846             </actions>
1847         </permacrud>
1848         </class>
1849
1850         <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">
1851                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1852                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1854                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1855                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1856                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1857                 </fields>
1858                 <links>
1859                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1860                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1861                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1862                 </links>
1863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1864             <actions>
1865                 <create permission="ADMIN_SURVEY">
1866                     <context link="survey" field="owner"/>
1867                 </create>
1868                 <retrieve/>
1869                 <update permission="ADMIN_SURVEY">
1870                     <context link="survey" field="owner"/>
1871                 </update>
1872                 <delete permission="ADMIN_SURVEY">
1873                     <context link="survey" field="owner"/>
1874                 </delete>
1875             </actions>
1876         </permacrud>
1877         </class>
1878         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1879                 <fields oils_persist:primary="id" oils_persist:sequence="">
1880                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1881                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1882                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1883                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1884                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1885                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1886                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1887                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1888                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1889                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1890                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1891                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1892                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1893                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1894                 </fields>
1895                 <links>
1896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1897                 </links>
1898         </class>
1899         <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">
1900                 <fields oils_persist:primary="id" oils_persist:sequence="">
1901                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1902                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1903                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1904                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1905                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1906                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1907                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1908                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1909                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1910                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1911                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1912                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1913                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1914                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1915                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1916                 </fields>
1917                 <links>
1918                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1919                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1920                 </links>
1921         </class>
1922         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1923                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1924                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1925                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1926                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1927                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1928                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1929                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1930                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1931                 </fields>
1932                 <links>
1933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1934                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1935                 </links>
1936         </class>
1937         <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">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1939                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1940                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1941                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1942                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1943                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1944                 </fields>
1945                 <links>
1946                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1947                 </links>
1948         </class>
1949         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1951                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1952                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1953                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1954                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1955                 </fields>
1956                 <links>
1957                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1958                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1959                 </links>
1960         </class>
1961         <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">
1962                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1963                         <field name="field" reporter:datatype="link"/>
1964                         <field name="id" reporter:datatype="id" />
1965                         <field name="source" reporter:datatype="link"/>
1966                         <field name="value" reporter:datatype="text"/>
1967                 </fields>
1968                 <links>
1969                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1970                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1971                 </links>
1972         </class>
1973         <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">
1974                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1975                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1977                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1978                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1979                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1980                 </fields>
1981                 <links>
1982                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1983                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1984                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1985                 </links>
1986         </class>
1987         <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">
1988                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1989                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1990                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1991                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1992                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1993                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1994                 </fields>
1995                 <links>
1996                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1997                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1998                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1999                 </links>
2000         </class>
2001         <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">
2002                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2003                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2004                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2005                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2006                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2008                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2009                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2010                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2012                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2013                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2017                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2018                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2019                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2020                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2021                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2022                 </links>
2023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2024             <actions>
2025                 <create permission="TRANSIT_COPY" context_field="owner">
2026                     <context link="target_copy" field="circ_lib"/>
2027                 </create>
2028                 <retrieve/>
2029                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2030                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2031             </actions>
2032         </permacrud>
2033         </class>
2034         <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">
2035                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2036                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2037                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2038                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2039                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2040                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2041                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2042                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2043                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2044                 </fields>
2045                 <links>
2046                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2047                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2048                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2049                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2050                 </links>
2051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2052             <actions>
2053                 <create permission="ADMIN_SURVEY">
2054                     <context link="survey" field="owner"/>
2055                 </create>
2056                 <retrieve/>
2057                 <update permission="ADMIN_SURVEY">
2058                     <context link="survey" field="owner"/>
2059                 </update>
2060                 <delete permission="ADMIN_SURVEY">
2061                     <context link="survey" field="owner"/>
2062                 </delete>
2063             </actions>
2064         </permacrud>
2065         </class>
2066         <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">
2067                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2068                         <field name="bucket" />
2069                         <field name="id" reporter:datatype="id" />
2070                         <field name="target_copy" reporter:datatype="link"/>
2071                         <field name="create_time" reporter:datatype="timestamp" />
2072                         <field name="pos" reporter:datatype="int" />
2073                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2074                 </fields>
2075                 <links>
2076                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2077                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2078             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2079                 </links>
2080         </class>
2081         <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">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2083                         <field name="id" reporter:datatype="id" />
2084                         <field name="item" reporter:datatype="link"/>
2085                         <field name="note" reporter:datatype="text" />
2086                 </fields>
2087                 <links>
2088                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2089                 </links>
2090         </class>
2091
2092         <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">
2093                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2094                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2095                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2096                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2097                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2098                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2099                 </fields>
2100                 <links>
2101                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2102                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2103                 </links>
2104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2105                         <actions>
2106                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                                 <retrieve/>
2108                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110                         </actions>
2111                 </permacrud>
2112         </class>
2113
2114         <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">
2115                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2116                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2117                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2118                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2119                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2120                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2121                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2123                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2124                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2125                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2126                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2127                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2128                 </fields>
2129                 <links>
2130                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2131                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2132                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2133                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2134                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2135                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2136                 </links>
2137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2138                         <actions>
2139                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2140                                 <retrieve/>
2141                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2143                         </actions>
2144                 </permacrud>
2145         </class>
2146
2147         <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">
2148                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2149                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2150                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2151                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2152                 </fields>
2153                 <links>
2154                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2155                 </links>
2156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157                         <actions>
2158                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                                 <retrieve/>
2160                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162                         </actions>
2163                 </permacrud>
2164         </class>
2165
2166         <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">
2167                 <fields oils_persist:primary="code">
2168                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2169                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2170                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2171                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2172                 </fields>
2173                 <links>
2174                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2175                 </links>
2176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2177                         <actions>
2178                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2179                                 <retrieve/>
2180                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2181                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2182                         </actions>
2183                 </permacrud>
2184         </class>
2185
2186         <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">
2187                 <fields oils_persist:primary="code">
2188                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2189                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2190                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2191                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2192                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2193                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2194                 </fields>
2195                 <links>
2196                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2197                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2198                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2199                 </links>
2200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2201                         <actions>
2202                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <retrieve/>
2204                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2205                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2206                         </actions>
2207                 </permacrud>
2208         </class>
2209
2210     <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">
2211         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2212             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2213             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2214             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2215         </fields>
2216         <links>
2217             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2218             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2219         </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2223                 <retrieve/>
2224                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2225                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226             </actions>
2227         </permacrud>
2228     </class>
2229
2230         <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">
2231                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2232                         <field name="active" reporter:datatype="bool"/>
2233                         <field name="create_date" reporter:datatype="timestamp"/>
2234                         <field name="creator" />
2235                         <field name="deleted" reporter:datatype="bool"/>
2236                         <field name="edit_date" reporter:datatype="timestamp"/>
2237                         <field name="editor" />
2238                         <field name="id" reporter:datatype="id" />
2239                         <field name="last_xact_id" />
2240                         <field name="marc" />
2241                         <field name="source" />
2242                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2243                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2244                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2245                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2247                 </fields>
2248                 <links>
2249                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2253                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2254                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2255                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2256                 </links>
2257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258                         <actions>
2259                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2260                                 <retrieve/>
2261                                 <update permission="UPDATE_MARC" global_required="true"/>
2262                                 <delete permission="UPDATE_MARC" global_required="true"/>
2263                         </actions>
2264                 </permacrud>
2265         </class>
2266         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2268                         <field name="char_encoding" />
2269                         <field name="id" />
2270                         <field name="record" />
2271                         <field name="record_status" />
2272                         <field name="thesaurus" />
2273                 </fields>
2274                 <links>
2275                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2276                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2277                 </links>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2281                         <field name="id" reporter:datatype="id" />
2282                         <field name="bib" reporter:datatype="link" />
2283                         <field name="authority" reporter:datatype="link" />
2284                 </fields>
2285                 <links>
2286                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2287                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2288                 </links>
2289         </class>
2290         <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">
2291                 <fields oils_persist:primary="code" oils_persist:sequence="">
2292                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2293                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2294                 </fields>
2295                 <links/>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2301                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2307                         <field name="accepting_usr" />
2308                         <field name="amount" reporter:datatype="money" />
2309                         <field name="amount_collected" reporter:datatype="money" />
2310                         <field name="approval_code" reporter:datatype="text"/>
2311                         <field name="cash_drawer" reporter:datatype="link"/>
2312                         <field name="cc_first_name" reporter:datatype="text"/>
2313                         <field name="cc_last_name" reporter:datatype="text"/>
2314                         <field name="cc_number" reporter:datatype="text"/>
2315                         <field name="cc_order_number" reporter:datatype="text"/>
2316                         <field name="cc_type" reporter:datatype="text"/>
2317                         <field name="cc_processor" reporter:datatype="text"/>
2318                         <field name="expire_month" reporter:datatype="int" />
2319                         <field name="expire_year" reporter:datatype="int" />
2320                         <field name="id" reporter:datatype="id" />
2321                         <field name="note" reporter:datatype="text"/>
2322                         <field name="payment_ts" reporter:datatype="timestamp"/>
2323                         <field name="xact" reporter:datatype="link"/>
2324                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2325                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2326                 </fields>
2327                 <links>
2328                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2329                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2330                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2331                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2332                 </links>
2333         </class>
2334         <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">
2335                 <fields oils_persist:primary="name">
2336                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2337                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2338                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2339                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2340                 </fields>
2341                 <links/>
2342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2343             <actions>
2344                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2345                 <retrieve/>
2346                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2347                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2348             </actions>
2349         </permacrud>
2350         </class>
2351
2352         <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">
2353                 <fields oils_persist:primary="alias">
2354                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2355                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2356                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2357                 </fields>
2358                 <links>
2359                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2360                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2361                 </links>
2362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2363             <actions>
2364                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2365                 <retrieve/>
2366                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2367                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2368             </actions>
2369         </permacrud>
2370         </class>
2371
2372         <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">
2373                 <fields oils_persist:primary="name">
2374                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2375                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2376                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2377                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2378                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2379                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2380                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2381                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2382                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2383                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2384                 </fields>
2385                 <links>
2386                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2387                 </links>
2388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2389             <actions>
2390                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2391                 <retrieve/>
2392                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2393                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397
2398         <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">
2399                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2400                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2401                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2402                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2403                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2404                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2405                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2406                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2407                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2408                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2409                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2410                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2411                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2412                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2413                 </fields>
2414                 <links>
2415                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2416                 </links>
2417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2418             <actions>
2419                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2420                 <retrieve/>
2421                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2422                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2423             </actions>
2424         </permacrud>
2425         </class>
2426         <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">
2427                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2428                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2430                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2431                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2432                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2433                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2434                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2435                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2436                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2437                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2438                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2439                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2440                 </fields>
2441                 <links>
2442                 </links>
2443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2444                         <actions>
2445                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2446                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2448                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2449                         </actions>
2450                 </permacrud>
2451         </class>
2452         <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">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2454                         <field name="id" reporter:datatype="id" />
2455                         <field name="name" reporter:datatype="text"/>
2456                         <field name="xpath" reporter:datatype="text"/>
2457                         <field name="format" reporter:datatype="link"/>
2458                         <field name="first_word" reporter:datatype="bool" />
2459                 </fields>
2460                 <links/>
2461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2462             <actions>
2463                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2464                 <retrieve/>
2465                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2466                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2467             </actions>
2468         </permacrud>
2469         </class>
2470         <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">
2471                 <fields oils_persist:primary="code" oils_persist:sequence="">
2472                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2473                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2474                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2475                 </fields>
2476                 <links/>
2477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2478             <actions>
2479                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2480                 <retrieve/>
2481                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2482                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2483             </actions>
2484         </permacrud>
2485         </class>
2486         <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">
2487                 <fields oils_persist:primary="code" oils_persist:sequence="">
2488                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2489                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2490                 </fields>
2491                 <links/>
2492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2493             <actions>
2494                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2495                 <retrieve/>
2496                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2497                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2498             </actions>
2499         </permacrud>
2500         </class>
2501     <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">
2502         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2503             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2504             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2505             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2506             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2507         </fields>
2508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509             <actions>
2510                 <retrieve/>
2511             </actions>
2512         </permacrud>
2513     </class>
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2516                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2517                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2518                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2519                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2520                 </fields>
2521                 <links>
2522                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2523                 </links>
2524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2525             <actions>
2526                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2527                 <retrieve/>
2528                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2529                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2530             </actions>
2531         </permacrud>
2532         </class>
2533         <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">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2536                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2537                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2538                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2539                 </fields>
2540                 <links>
2541                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2542                 </links>
2543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544             <actions>
2545                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2546                 <retrieve/>
2547                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2548                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2549             </actions>
2550         </permacrud>
2551         </class>
2552         <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">
2553                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2554                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2556                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2557                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2558                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2559                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2560                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2561                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2562                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2563                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2564                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2565                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2566                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2567                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2568                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2569                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2570                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2571                 </fields>
2572                 <links>
2573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2575                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2576                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2577                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2578                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2579                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2580                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2581                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2582                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2583                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2584                 </links>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2590                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2591             </actions>
2592         </permacrud>
2593         </class>
2594         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2595                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2596                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2597                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2599                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2600                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2601                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2606                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2607         </links>
2608         </class>
2609         <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">
2610                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2612                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2613                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2614                 </fields>
2615                 <links>
2616                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2617                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2618                 </links>
2619         </class>
2620         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2622                         <field name="id" reporter:datatype="id" />
2623                         <field name="value" oils_persist:i18n="true" />
2624                 </fields>
2625                 <links/>
2626         </class>
2627         <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">
2628                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2629                         <field name="balance_owed" reporter:datatype="money" />
2630                         <field name="total_owed" reporter:datatype="money" />
2631                         <field name="total_paid" reporter:datatype="money" />
2632                         <field name="usr" reporter:datatype="link"/>
2633                 </fields>
2634                 <links>
2635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2636         </links>
2637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638             <actions>
2639                 <retrieve permission="VIEW_USER">
2640                     <context link="usr" field="home_ou"/>
2641                 </retrieve>
2642             </actions>
2643         </permacrud>
2644         </class>
2645         <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">
2646                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2647                         <field name="collector" />
2648                         <field name="enter_time" reporter:datatype="timestamp"/>
2649                         <field name="id" reporter:datatype="id" />
2650                         <field name="location" reporter:datatype="link"/>
2651                         <field name="usr" reporter:datatype="link"/>
2652                 </fields>
2653                 <links>
2654                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2655                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2657                 </links>
2658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659             <actions>
2660                 <create permission="money.collections_tracker.create" context_field="location"/>
2661                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2662                 <delete permission="money.collections_tracker.create" context_field="location"/>
2663             </actions>
2664         </permacrud>
2665         </class>
2666         <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">
2667                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2668                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2671                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2672                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2673                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2674                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2675                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2676                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2677                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2678                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2679                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2680                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2681                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2682                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2683                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2684                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2685                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2686                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2700                 </fields>
2701                 <links>
2702                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2703                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2704                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2705                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2706                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2707                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2708                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2709                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2710                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2711                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2712                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2713                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2714                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2715                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2716                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2717                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2718                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2719                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2720                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2721                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2722                 </links>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_MARC" global_required="true"/>
2728             </actions>
2729         </permacrud>
2730         </class>
2731         <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">
2732                 <fields oils_persist:primary="id">
2733                         <field name="dow_0_close" />
2734                         <field name="dow_0_open" />
2735                         <field name="dow_1_close" />
2736                         <field name="dow_1_open" />
2737                         <field name="dow_2_close" />
2738                         <field name="dow_2_open" />
2739                         <field name="dow_3_close" />
2740                         <field name="dow_3_open" />
2741                         <field name="dow_4_close" />
2742                         <field name="dow_4_open" />
2743                         <field name="dow_5_close" />
2744                         <field name="dow_5_open" />
2745                         <field name="dow_6_close" />
2746                         <field name="dow_6_open" />
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2749                 </fields>
2750                 <links>
2751                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2752                 </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2758                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2759             </actions>
2760         </permacrud>
2761         </class>
2762         <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">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2764                         <field name="id" reporter:datatype="id" />
2765                         <field name="record" reporter:datatype="link"/>
2766                         <field name="label" reporter:datatype="text"/>
2767                         <field name="label_sortkey" reporter:datatype="text"/>
2768                 </fields>
2769                 <links>
2770                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2771                 </links>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2777                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781         <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">
2782                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2783                         <field name="id" reporter:datatype="id" />
2784                         <field name="target_copy" reporter:datatype="link" />
2785                         <field name="part" reporter:datatype="link"/>
2786                 </fields>
2787                 <links>
2788                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2789                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2790                 </links>
2791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2792             <actions>
2793                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2794                 <retrieve/>
2795                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2796                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2797             </actions>
2798         </permacrud>
2799         </class>
2800         <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">
2801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2802                         <field name="close_end" reporter:datatype="timestamp" />
2803                         <field name="close_start" reporter:datatype="timestamp" />
2804                         <field name="id" reporter:datatype="id" />
2805                         <field name="org_unit" reporter:datatype="org_unit"/>
2806                         <field name="reason" reporter:datatype="text"/>
2807                 </fields>
2808                 <links>
2809                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2816                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2822                         <field name="extended" reporter:datatype="interval"/>
2823                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2824                         <field name="max_renewals" reporter:datatype="int" />
2825                         <field name="name" reporter:datatype="text"/>
2826                         <field name="normal" reporter:datatype="interval"/>
2827                         <field name="shrt" reporter:datatype="interval"/>
2828                 </fields>
2829                 <links>
2830                 </links>
2831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2832             <actions>
2833                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2834                 <retrieve/>
2835                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2836                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2837             </actions>
2838         </permacrud>
2839         </class>
2840
2841         <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">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2843                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2844                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2845             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2846                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2847             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2848                 </fields>
2849                 <links>
2850             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2851                 </links>
2852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853             <actions>
2854                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2855                 <retrieve/>
2856                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2857                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2858             </actions>
2859                 </permacrud>
2860         </class>
2861
2862         <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">
2863                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2865                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2866                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2867             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2868                 </fields>
2869                 <links>
2870                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2871                 </links>
2872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2873             <actions>
2874                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2875                 <retrieve/>
2876                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2877                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2878             </actions>
2879                 </permacrud>
2880         </class>
2881
2882         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="">
2884                         <field name="balance_owed" reporter:datatype="money"/>
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="last_billing_note" reporter:datatype="text"/>
2887                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2888                         <field name="last_billing_type" reporter:datatype="text"/>
2889                         <field name="last_payment_note" reporter:datatype="text"/>
2890                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2891                         <field name="last_payment_type" reporter:datatype="text"/>
2892                         <field name="total_owed" reporter:datatype="money"/>
2893                         <field name="total_paid" reporter:datatype="money"/>
2894                         <field name="usr" reporter:datatype="link"/>
2895                         <field name="xact_finish" reporter:datatype="timestamp" />
2896                         <field name="xact_start" reporter:datatype="timestamp" />
2897                         <field name="xact_type" reporter:datatype="text"/>
2898                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field name="billing_location" reporter:datatype="link"/>
2903                 </fields>
2904                 <links>
2905                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2906                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2907                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2908                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2909                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2910                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2911                 </links>
2912         </class>
2913         <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">
2914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2915                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2916                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2925                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2926                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2927                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2928                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2929                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2930                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2931                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2932                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2933                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2934                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2935                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2936                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2937                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2938                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2939                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2940                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2941                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2942                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2943                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2944                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2945                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2946                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2947                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2948                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2949                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2950                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2951                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2952                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2953                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2954                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2955                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2956                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2957                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2958                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2959                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2960                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2961                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2962                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2963                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2964                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2965                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2966                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2968                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2978                 </fields>
2979                 <links>
2980                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2981                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2982                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2983                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2984                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2985                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2986                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2987                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2988                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2989                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2990                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2991                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2992                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2993                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2994                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2995                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2996                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2997                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2998                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2999                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3000                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3001                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3002                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3003                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3004                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3005                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3006                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3007                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3008                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3009                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3010                 </links>
3011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3012                         <actions>
3013                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3014                         </actions>
3015                 </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3019                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3020                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3021                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3022                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3023                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3024                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3025                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3026                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3027         </fields>
3028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029                         <actions>
3030                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3031                                 <retrieve/>
3032                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3033                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3034                         </actions>
3035                 </permacrud>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3039                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3040                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3041                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3042                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3043         </fields>
3044         <links>
3045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3047                 </links>
3048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3049                         <actions>
3050                                 <retrieve permission="RUN_REPORTS">
3051                                         <context link="usr" field="home_ou" />
3052                                 </retrieve>
3053                         </actions>
3054                 </permacrud>
3055         </class>
3056         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3058                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3059                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3060                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3061                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3062                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3063                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3064         </fields>
3065         <links>
3066                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3067                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3068                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3069                 </links>
3070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071                         <actions>
3072                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3073                                         <context link="usr" field="home_ou" />
3074                                         <context link="ws" field="owning_lib" />
3075                                 </retrieve>
3076                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3077                                         <context link="usr" field="home_ou" />
3078                                         <context link="ws" field="owning_lib" />
3079                                 </create>
3080                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3081                                         <context link="usr" field="home_ou" />
3082                                         <context link="ws" field="owning_lib" />
3083                                 </update>
3084                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3085                                         <context link="usr" field="home_ou" />
3086                                         <context link="ws" field="owning_lib" />
3087                                 </delete>
3088                         </actions>
3089                 </permacrud>
3090         </class>
3091         <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">
3092                 <fields oils_persist:primary="name">
3093                         <field name="name" reporter:datatype="text"/>
3094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3095                 </fields>
3096                 <links/>
3097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3098                         <actions>
3099                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3100                                 <retrieve/>
3101                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3102                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3103                         </actions>
3104                 </permacrud>
3105         </class>
3106         <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">
3107                 <fields oils_persist:primary="name">
3108                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3109                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3110                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3111                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3112                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3113                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3114                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3115                 </fields>
3116                 <links>
3117                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3118                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3119                 </links>
3120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3121                         <actions>
3122                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3123                                 <retrieve/>
3124                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3125                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3126                         </actions>
3127                 </permacrud>
3128         </class>
3129         <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">
3130                 <fields oils_persist:primary="name">
3131                         <field name="name" reporter:datatype="text"/>
3132                         <field name="label" reporter:datatype="text"/>
3133                         <field name="description" reporter:datatype="text"/>
3134                         <field name="datatype" reporter:datatype="text"/>
3135                         <field name="view_perm" reporter:datatype="link"/>
3136                         <field name="update_perm" reporter:datatype="link"/>
3137                         <field name="fm_class" reporter:datatype="text"/>
3138                         <field name="grp" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3142                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3143                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3144                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3145                 </links>
3146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147                         <actions>
3148                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3149                                 <retrieve/>
3150                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3151                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3152                         </actions>
3153                 </permacrud>
3154         </class>
3155         <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">
3156                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3157                         <field name="id" />
3158                         <field name="name"  reporter:datatype="text"/>
3159                         <field name="org_unit" reporter:datatype="org_unit"/>
3160                         <field name="value"  reporter:datatype="text"/>
3161                 </fields>
3162                 <links>
3163                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3164                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3165                 </links>
3166         </class>
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3169                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3170                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3171                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3172                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3173                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3174                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3175                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3179                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3180                 </links>
3181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182             <actions>
3183                 <create permission="CREATE_COPY_NOTE">
3184                     <context link="owning_copy" field="circ_lib"/>
3185                 </create>
3186                 <retrieve permission="VIEW_COPY_NOTES">
3187                     <context link="owning_copy" field="circ_lib"/>
3188                 </retrieve>
3189                 <update permission="UPDATE_COPY_NOTE">
3190                     <context link="owning_copy" field="circ_lib"/>
3191                 </update>
3192                 <delete permission="DELETE_COPY_NOTE">
3193                     <context link="owning_copy" field="circ_lib"/>
3194                 </delete>
3195             </actions>
3196         </permacrud>
3197         </class>
3198         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3199                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3200                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3201                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3202                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3203                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3204                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3205                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3206                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3207                 </fields>
3208                 <links>
3209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3210                 </links>
3211         </class>
3212         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3214                         <field name="fingerprint"  reporter:datatype="text"/>
3215                         <field name="id" reporter:datatype="id" />
3216                         <field name="master_record" reporter:datatype="link"/>
3217                         <field name="mods"  reporter:datatype="text"/>
3218                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3222                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3223                 </links>
3224         </class>
3225         <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">
3226                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3227                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3228                         <field name="name"  reporter:datatype="text"/>
3229                 </fields>
3230                 <links/>
3231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3232             <actions>
3233                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3234                 <retrieve/>
3235                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3236                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3237             </actions>
3238         </permacrud>
3239         </class>
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3242                         <field name="code"  reporter:datatype="text"/>
3243                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3244                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3245                 </fields>
3246                 <links/>
3247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3248             <actions>
3249                 <create permission="CREATE_PERM" global_required="true"/>
3250                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3251                 <update permission="UPDATE_PERM" global_required="true"/>
3252                 <delete permission="DELETE_PERM" global_required="true"/>
3253             </actions>
3254         </permacrud>
3255         </class>
3256         <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">
3257                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3258                         <field name="id" reporter:datatype="id" />
3259                         <field name="metarecord" reporter:datatype="link"/>
3260                         <field name="source" reporter:datatype="link"/>
3261                 </fields>
3262                 <links>
3263                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3264                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3265                 </links>
3266         </class>
3267         <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">
3268                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3269                         <field name="id" reporter:datatype="id" />
3270                         <field name="field" reporter:datatype="link"/>
3271                         <field name="source" reporter:datatype="link"/>
3272                         <field name="value"  reporter:datatype="text"/>
3273                 </fields>
3274                 <links>
3275                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3276                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3277                 </links>
3278         </class>
3279         <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">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3281                         <field name="id" reporter:datatype="id" />
3282                         <field name="value" reporter:datatype="text"/>
3283                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3284                 </fields>
3285                 <links>
3286                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3287                 </links>
3288         </class>
3289         <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">
3290                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3291                         <field name="id" reporter:datatype="id" />
3292                         <field name="entry" reporter:datatype="link"/>
3293                         <field name="def" reporter:datatype="link"/>
3294                         <field name="source" reporter:datatype="link"/>
3295                 </fields>
3296                 <links>
3297                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3298                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3299                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3300                 </links>
3301         </class>
3302         <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">
3303                 <oils_persist:source_definition>
3304                         SELECT * FROM metabib.author_field_entry
3305                                                 UNION ALL
3306                         SELECT * FROM metabib.keyword_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.identifier_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.title_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.subject_field_entry
3313                                                 UNION ALL
3314                         SELECT * FROM metabib.series_field_entry
3315                 </oils_persist:source_definition>
3316                 <fields>
3317                         <field name="field" reporter:datatype="link"/>
3318                         <field name="id" reporter:datatype="id" />
3319                         <field name="source" reporter:datatype="link"/>
3320                         <field name="value"  reporter:datatype="text"/>
3321                 </fields>
3322                 <links>
3323                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3324                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3325                 </links>
3326         </class>
3327         <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">
3328                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3329                         <field name="field" reporter:datatype="link"/>
3330                         <field name="id" reporter:datatype="id" />
3331                         <field name="source" reporter:datatype="link"/>
3332                         <field name="value"  reporter:datatype="text"/>
3333                 </fields>
3334                 <links>
3335                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3336                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3337                 </links>
3338         </class>
3339         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3340                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3341                         <field name="accepting_usr" reporter:datatype="link"/>
3342                         <field name="amount" reporter:datatype="money" />
3343                         <field name="amount_collected" reporter:datatype="money" />
3344                         <field name="cash_drawer" reporter:datatype="link"/>
3345                         <field name="id" reporter:datatype="id" />
3346                         <field name="note"  reporter:datatype="text"/>
3347                         <field name="payment_ts" reporter:datatype="timestamp"/>
3348                         <field name="xact" reporter:datatype="link"/>
3349                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3350                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3351                 </fields>
3352                 <links>
3353                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3354                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3355                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3356                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3357                 </links>
3358         </class>
3359         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3360                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3361                         <field name="accepting_usr" reporter:datatype="link"/>
3362                         <field name="amount" reporter:datatype="money" />
3363                         <field name="amount_collected" reporter:datatype="money" />
3364                         <field name="id" reporter:datatype="id" />
3365                         <field name="note"  reporter:datatype="text"/>
3366                         <field name="payment_ts" reporter:datatype="timestamp"/>
3367                         <field name="xact" reporter:datatype="link"/>
3368                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3369                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3370                 </fields>
3371                 <links>
3372                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3373                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3374                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3375                 </links>
3376         </class>
3377         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3378                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3379                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3380                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3381                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3384                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3386                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3388                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3390                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3392                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3394                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3395                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3396                 </fields>
3397                 <links>
3398                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3399                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3400                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3401                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3402                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3403                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3404                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3405                 </links>
3406         </class>
3407
3408         <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">
3409                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3410                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3411                         <field name="name"  reporter:datatype="text"/>
3412                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3413                         <field name="block_list" reporter:datatype="text"/>
3414                         <field name="staff_alert" reporter:datatype="bool"/>
3415                         <field name="org_depth" reporter:datatype="int"/>
3416                 </fields>
3417                 <links/>
3418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3419             <actions>
3420                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3421                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3422                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3423                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3424             </actions>
3425         </permacrud>
3426         </class>
3427         <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">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3429                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3430                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3431                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3432                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3433                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3434                 </fields>
3435                 <links>
3436                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3437                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3438                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3439         </links>
3440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3441             <actions>
3442                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3443                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3444                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3445                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3446             </actions>
3447         </permacrud>
3448         </class>
3449         <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">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3451                         <field name="holdable" reporter:datatype="bool"/>
3452                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3453                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3454                         <field name="opac_visible" reporter:datatype="bool"/>
3455             <field name="copy_active" reporter:datatype="bool"/>
3456             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3457                 </fields>
3458                 <links/>
3459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3460             <actions>
3461                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3462                 <retrieve/>
3463                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3464                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3465             </actions>
3466         </permacrud>
3467         </class>
3468         <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">
3469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3470                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3471                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3472                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3473                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3474                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3475                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3476                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3477                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3478                 </fields>
3479                 <links>
3480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3481                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3482                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3483                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3484                 </links>
3485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486                         <actions>
3487                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3488                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3489                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3490                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3491                         </actions>
3492                 </permacrud>
3493         </class>
3494         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3496                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3497                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3498                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3499                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3500                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3501                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3502                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3503                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3504                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3505                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3506                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3507                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3508                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3509                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3510                 </fields>
3511                 <links>
3512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3513                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3514                 </links>
3515         </class>
3516         <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">
3517                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3518                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3519                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3520                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3521                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3522                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3523                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3524                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3525                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3526                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3527                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3528                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3529                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3530                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3531                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3532                 </fields>
3533                 <links>
3534                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3535                 </links>
3536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3537                         <actions>
3538                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3539                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3540                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3541                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3542                         </actions>
3543                 </permacrud>
3544         </class>
3545
3546
3547         <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">
3548                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3549                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3550                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3551                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3552                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3553                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3554                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3555                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3556                 </fields>
3557                 <links>
3558                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3559                 </links>
3560         </class>
3561
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3564                         <field name="call_number" />
3565                         <field name="create_date" reporter:datatype="timestamp"/>
3566                         <field name="creator" reporter:datatype="link"/>
3567                         <field name="id" reporter:datatype="id" />
3568                         <field name="pub" reporter:datatype="bool"/>
3569                         <field name="title"  reporter:datatype="text"/>
3570                         <field name="value"  reporter:datatype="text"/>
3571                 </fields>
3572                 <links>
3573                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_VOLUME_NOTE">
3578                     <context link="call_number" field="owning_lib"/>
3579                 </create>
3580                 <retrieve permission="VIEW_VOLUME_NOTES">
3581                     <context link="call_number" field="owning_lib"/>
3582                 </retrieve>
3583                 <update permission="UPDATE_VOLUME_NOTE">
3584                     <context link="call_number" field="owning_lib"/>
3585                 </update>
3586                 <delete permission="DELETE_VOLUME_NOTE">
3587                     <context link="call_number" field="owning_lib"/>
3588                 </delete>
3589             </actions>
3590         </permacrud>
3591         </class>
3592         <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">
3593                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3594                         <field name="create_date" reporter:datatype="timestamp"/>
3595                         <field name="creator" reporter:datatype="link"/>
3596                         <field name="edit_date" reporter:datatype="timestamp"/>
3597                         <field name="editor" reporter:datatype="link"/>
3598                         <field name="id" reporter:datatype="id" />
3599                         <field name="record" reporter:datatype="link"/>
3600                         <field name="value" reporter:datatype="text"/>
3601                 </fields>
3602                 <links>
3603                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3604                 </links>
3605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3606             <actions>
3607                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3608                 <retrieve/>
3609                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3610                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3611             </actions>
3612         </permacrud>
3613         </class>
3614         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3615         <oils_persist:source_definition>
3616 SELECT  usr,
3617         SUM(
3618             CASE
3619                 WHEN (
3620                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3621                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3622                 ) THEN 1
3623                 ELSE 0
3624             END
3625         ) AS out,
3626
3627         SUM(
3628             CASE
3629                 WHEN (
3630                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3631                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3632                 ) THEN 1
3633                 ELSE 0
3634             END
3635         ) AS overdue,
3636
3637         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3638         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3639         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3640   FROM  action.circulation
3641   WHERE checkin_time IS NULL
3642   GROUP BY 1
3643         </oils_persist:source_definition>
3644         <fields oils_persist:primary="usr">
3645             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3646             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3647             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3648             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3649             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3650             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3651         </fields>
3652         <links>
3653             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3654         </links>
3655         </class>
3656         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3657         <oils_persist:source_definition>
3658 SELECT  usr,
3659         ARRAY_TO_STRING(ARRAY_ACCUM(
3660             CASE
3661                 WHEN (
3662                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3663                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3664                 ) THEN id
3665                 ELSE 0
3666             END
3667         ),',') AS out,
3668
3669         ARRAY_TO_STRING(ARRAY_ACCUM(
3670             CASE
3671                 WHEN (
3672                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3673                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3674                 ) THEN id
3675                 ELSE 0
3676             END
3677         ),',') AS overdue,
3678
3679         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3680         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3681         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3682   FROM  action.circulation
3683   WHERE checkin_time IS NULL
3684   GROUP BY 1
3685         </oils_persist:source_definition>
3686         <fields oils_persist:primary="usr">
3687             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3688             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3689             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3690             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3691             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3692             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3693         </fields>
3694         <links>
3695             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3696         </links>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3700                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3701                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3702                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3703                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3704                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3705                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3706                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3707                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3708                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3709                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3710                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3711                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3712                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3713                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3714                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3715                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3716                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3717                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3718                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3719                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3720                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3721                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3722                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3723                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3724                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3725                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3726                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3727                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3728                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3729                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3730                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3732                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3734                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3735                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3736                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3737                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3738                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3739                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3740                 </fields>
3741                 <links>
3742                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3743                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3744                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3745                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3746                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3747                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3748                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3749                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3750                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3751                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3752                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3753                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3754                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3755                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3756                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3757                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3758                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3759                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3760                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3761                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3762                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3763                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3764                 </links>
3765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3766                         <actions>
3767                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3768                         </actions>
3769                 </permacrud>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3773                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3774                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3775                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3776                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3777                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3778                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3779                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3780                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3781                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3782                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3783                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3784                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3785                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3786                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3787                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3788                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3789                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3790                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3791                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3792                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3793                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3794                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3795                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3796                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3797                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3798                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3799                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3800                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3801                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3803                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3804                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3805                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3806                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3807                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3808                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3809                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3810                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3811                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3812                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3813                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3814                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3815                 </fields>
3816                 <links>
3817                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3818                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3819                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3820                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3821                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3823                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3824                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3825                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3826                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3827                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3828                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3829                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3830                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3831                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3832                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3833                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3834                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3835                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3836                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3837                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3838                 </links>
3839         </class>
3840         <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">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3842                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3843                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3844                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3845                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3846                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3847                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3848                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3849                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3850                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3851                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3852                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3853                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3854                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3855                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3856                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3857                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3858                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3859                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3860                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3861                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3862                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3863                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3864                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3865                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3866                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3867                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3868                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3869                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3870                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3871                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3872                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3874                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3876                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3877                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3878                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3879                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3880                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3881                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3882                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3883                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3884                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3885                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3886                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3887                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3888                 </fields>
3889                 <links>
3890                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3891                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3892                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3893                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3894                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3895                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3896                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3897                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3898                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3899                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3900                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3901                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3902                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3903                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3904                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3905                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3906                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3907                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3908                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3909                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3910                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3911                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3912                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3913                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3914                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3915                 </links>
3916         </class>
3917
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3920                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3921                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3922                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3923                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3924                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3925                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3926                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3927                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3928                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3929                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3930                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3933                 </fields>
3934                 <links>
3935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3937                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3938                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3939                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3940                 </links>
3941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3942                         <actions>
3943                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3944                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3945                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3946                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3947                         </actions>
3948                 </permacrud>
3949         </class>
3950
3951         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3952                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3953                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3954                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3955                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3956                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3957                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3958                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3959                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3960                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3961                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3962                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3963                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3965                 </fields>
3966                 <links>
3967                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3968                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3969                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3970                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3971                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3972                 </links>
3973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3974                         <actions>
3975                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3976                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3977                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3978                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3979                         </actions>
3980                 </permacrud>
3981         </class>
3982         
3983         <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">
3984                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3985                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3986                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3987                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3988                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3989                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3990                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3991                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3995                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3996                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3997                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3998                 </links>
3999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4000                         <actions>
4001                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4002                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4003                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4004                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4005                         </actions>
4006                 </permacrud>
4007         </class>
4008         
4009         <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">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4011                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4012                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4013                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4014                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4015                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4016                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4017                 </fields>
4018                 <links>
4019                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4020                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4021                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4022                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4023                 </links>
4024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4025                         <actions>
4026                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4027                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4028                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4029                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4030                         </actions>
4031                 </permacrud>
4032         </class>
4033         
4034         <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">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4036                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4037                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4038                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4039                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4040                 </fields>
4041                 <links>
4042                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4043                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4044                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4045                 </links>
4046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047                         <actions>
4048                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4049                     <context link="resource" field="owner" />
4050                 </create>
4051                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4052                     <context link="resource" field="owner" />
4053                 </retrieve>
4054                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4055                     <context link="resource" field="owner" />
4056                 </update>
4057                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4058                     <context link="resource" field="owner" />
4059                 </delete>
4060                         </actions>
4061                 </permacrud>
4062         </class>
4063         
4064         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4065                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4066                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4067                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4068                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4070                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4071                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4074                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4075                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4076                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4077                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4082                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4084                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4085                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4086                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4087                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4088                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4089                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4090                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4091                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4092                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4093                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4094                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4095                 </fields>
4096                 <links>
4097                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4098                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4099                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4100                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4101                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4102                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4103                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4104                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4105                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4106                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4107                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4108                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4109                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4114                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4115                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4116                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4117                         </actions>
4118                 </permacrud>
4119         </class>
4120         
4121         <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">
4122                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4123                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4124                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4125                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4126                 </fields>
4127                 <links>
4128                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4129                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4130                 </links>
4131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4132                         <actions>
4133                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4134                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4135                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4136                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4137                         </actions>
4138                 </permacrud>
4139         </class>
4140
4141         <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">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4143                         <field name="bucket" reporter:datatype="link"/>
4144                         <field name="id" reporter:datatype="id" />
4145                         <field name="target_call_number" reporter:datatype="link" />
4146                         <field name="create_time" reporter:datatype="timestamp" />
4147                         <field name="pos" reporter:datatype="int" />
4148                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4149                 </fields>
4150                 <links>
4151                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4152                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4153             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4154                 </links>
4155         </class>
4156         <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">
4157                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4158                         <field name="id" reporter:datatype="id" />
4159                         <field name="item" reporter:datatype="link"/>
4160                         <field name="note" reporter:datatype="text" />
4161                 </fields>
4162                 <links>
4163                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4164                 </links>
4165         </class>
4166         <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">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4168                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4169                         <field name="btype" reporter:datatype="text"/>
4170                         <field name="id" reporter:datatype="id" />
4171                         <field name="name" reporter:datatype="text"/>
4172                         <field name="description" reporter:datatype="text"/>
4173                         <field name="owner" reporter:datatype="link"/>
4174                         <field name="pub" reporter:datatype="bool"/>
4175                         <field name="create_time" reporter:datatype="timestamp" />
4176                 </fields>
4177                 <links>
4178                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4179                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4180                 </links>
4181         </class>
4182         <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">
4183                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4184                         <field name="id" reporter:datatype="id" />
4185                         <field name="bucket" reporter:datatype="link"/>
4186                         <field name="note" reporter:datatype="text" />
4187                 </fields>
4188                 <links>
4189                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4190                 </links>
4191         </class>
4192         <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">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4194                         <field name="hold" reporter:datatype="link"/>
4195                         <field name="id" reporter:datatype="id" />
4196                         <field name="target_copy" reporter:datatype="link"/>
4197                         <field name="proximity" reporter:datatype="number"/>
4198                 </fields>
4199                 <links>
4200                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4201                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4202                 </links>
4203         </class>
4204         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4206                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4207                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4208                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4209                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4210                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4211                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4212                 </fields>
4213                 <links>
4214                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4215                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4216                 </links>
4217         </class>
4218         <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">
4219                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4220                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4221                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4222                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4223                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4224                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4225                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4226                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4227                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4228                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4229                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4230                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4231                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4232                 </fields>
4233                 <links>
4234                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4235                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4236                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4237                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4238                 </links>
4239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4240             <actions>
4241                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4242                 <retrieve/>
4243                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4244                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4245             </actions>
4246         </permacrud>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4250                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4251                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4252                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4253                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4254             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4255             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4256             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4257                 </fields>
4258                 <links>
4259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4260                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4261                 </links>
4262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4263             <actions>
4264                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4265                 <retrieve/>
4266                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4267                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4268             </actions>
4269         </permacrud>
4270         </class>
4271         <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">
4272                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4273                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4274             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4275             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4276                 </fields>
4277                 <links>
4278                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4279                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4280                 </links>
4281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4282             <actions>
4283                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4284                                         <context link="lgroup" field="owner" />
4285                 </create>
4286                 <retrieve/>
4287                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4288                                         <context link="lgroup" field="owner" />
4289                 </update>
4290                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4291                                         <context link="lgroup" field="owner" />
4292                 </delete>
4293             </actions>
4294         </permacrud>
4295         </class>
4296
4297     <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">
4298         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4299             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4300             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4301             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4302             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4303         </fields>
4304         <links>
4305             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4306             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4307         </links>
4308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4309             <actions>
4310                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4311                 <retrieve/>
4312                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4313                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4314             </actions>
4315         </permacrud>
4316     </class>
4317
4318         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4319                 <fields>
4320                         <field name="sre_id" oils_persist:virtual="true" />
4321                         <field name="location" oils_persist:virtual="true" />
4322                         <field name="owning_lib" oils_persist:virtual="true" />
4323                         <field name="basic_holdings" oils_persist:virtual="true" />
4324                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4325                         <field name="supplement_holdings" oils_persist:virtual="true" />
4326                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4327                         <field name="index_holdings" oils_persist:virtual="true" />
4328                         <field name="index_holdings_add" oils_persist:virtual="true" />
4329                         <field name="online" oils_persist:virtual="true" />
4330                         <field name="missing" oils_persist:virtual="true" />
4331                         <field name="incomplete" oils_persist:virtual="true" />
4332                 </fields>
4333         </class>
4334
4335         <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">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4337                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4338                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4339                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4340                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4341                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4342                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4344                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4345                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4346                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4347                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4348                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4349                 </fields>
4350                 <links>
4351                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4352                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4353                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4354                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4355                 </links>
4356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4357                         <actions>
4358                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4359                                 <retrieve/>
4360                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4361                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4362                         </actions>
4363                 </permacrud>
4364         </class>
4365
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4368                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4369                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4370                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4371                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4373                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4375                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4376                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4377                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4380                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4381                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4382                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4383                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4385                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4386                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4387                 </fields>
4388                 <links>
4389                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4390                 </links>
4391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4392                         <actions>
4393                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4394                                         <context link="subscription" field="owning_lib" />
4395                                 </create>
4396                                 <retrieve />
4397                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4398                                         <context link="subscription" field="owning_lib" />
4399                                 </update>
4400                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4401                                         <context link="subscription" field="owning_lib" />
4402                                 </delete>
4403                         </actions>
4404                 </permacrud>
4405         </class>
4406
4407         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4410                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4411                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4412                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4413                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4414                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4415                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4419                 </fields>
4420                 <links>
4421                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4422                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4423                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4424                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4425                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4426                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4427                 </links>
4428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4429                         <actions>
4430                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4431                                 <retrieve />
4432                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4433                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4434                         </actions>
4435                 </permacrud>
4436         </class>
4437
4438         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4439                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4440                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4441                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4442                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4443                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4444                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4445                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4446                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4447                 </fields>
4448                 <links>
4449                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4451                 </links>
4452         </class>
4453
4454         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4456                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4457                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4458                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4459                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4460                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4461                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4462                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4463                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4464                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4465                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4466                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4467                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4468                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4469                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4470                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4474                 </fields>
4475                 <links>
4476                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4477                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4478                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4479                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4480                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4481                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4482                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4483                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4484                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4485                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4486                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4487                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4488                 </links>
4489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490                         <actions>
4491                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4492                                 <retrieve />
4493                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4494                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4495                         </actions>
4496                 </permacrud>
4497         </class>
4498
4499         <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">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4501                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4502                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4503                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4504                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4505                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4506                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4507                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4508                 </fields>
4509                 <links>
4510                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4511                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4512                 </links>
4513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4514                         <actions>
4515                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4516                                         <context link="distribution" field="holding_lib" />
4517                                 </create>
4518                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4519                                         <context link="distribution" field="holding_lib" />
4520                                 </retrieve>
4521                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4522                                         <context link="distribution" field="holding_lib" />
4523                                 </update>
4524                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4525                                         <context link="distribution" field="holding_lib" />
4526                                 </delete>
4527                         </actions>
4528                 </permacrud>
4529         </class>
4530
4531         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4532                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4533                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4534                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4535                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4536                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4537                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4538                 </fields>
4539                 <links>
4540                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4541                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4542                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4543                 </links>
4544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4545                         <actions>
4546                                 <create permission="ADMIN_SERIAL_STREAM">
4547                                         <context link="distribution" field="holding_lib" />
4548                                 </create>
4549                                 <retrieve />
4550                                 <update permission="ADMIN_SERIAL_STREAM">
4551                                         <context link="distribution" field="holding_lib" />
4552                                 </update>
4553                                 <delete permission="ADMIN_SERIAL_STREAM">
4554                                         <context link="distribution" field="holding_lib" />
4555                                 </delete>
4556                         </actions>
4557                 </permacrud>
4558         </class>
4559
4560         <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">
4561                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4562                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4563                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4564                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4565                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4566                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4567                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4568                 </fields>
4569                 <links>
4570                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4571                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4572                 </links>
4573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4574                         <actions>
4575                                 <create permission="ADMIN_SERIAL_STREAM">
4576                                         <context link="stream" jump="distribution" field="holding_lib" />
4577                                 </create>
4578                                 <retrieve permission="RECEIVE_SERIAL">
4579                                         <context link="stream" jump="distribution" field="holding_lib" />
4580                                 </retrieve>
4581                                 <update permission="ADMIN_SERIAL_STREAM">
4582                                         <context link="stream" jump="distribution" field="holding_lib" />
4583                                 </update>
4584                                 <delete permission="ADMIN_SERIAL_STREAM">
4585                                         <context link="stream" jump="distribution" field="holding_lib" />
4586                                 </delete>
4587                         </actions>
4588                 </permacrud>
4589         </class>
4590
4591         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4592                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4593                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4594                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4595                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4596                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4597                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4599                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4600                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4601                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4602                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4603                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4604                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4605                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4606                 </fields>
4607                 <links>
4608                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4609                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4610                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4611                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4612                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4613                 </links>
4614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4615                         <actions>
4616                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4617                                         <context link="subscription" field="owning_lib" />
4618                                 </create>
4619                                 <retrieve/>
4620                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4621                                         <context link="subscription" field="owning_lib" />
4622                                 </update>
4623                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4624                                         <context link="subscription" field="owning_lib" />
4625                                 </delete>
4626                         </actions>
4627                 </permacrud>
4628         </class>
4629
4630         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4633                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4634                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4635                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4636                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4637                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4638                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4639                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4640                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4641                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4642                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4643                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4644                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4645                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4646                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4647                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4648                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4649                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4650                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4651                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4652                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4653                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4654                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4655                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4656                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4657                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4658                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4659                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4660                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4661                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4662                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4663                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4664                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4665                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4666                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4667                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4668                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4670                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4674                 </fields>
4675                 <links>
4676                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4677                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4678                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4679                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4680                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4682                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4683                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4684                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4685                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4686                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4687                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4688                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4689                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4690                 </links>
4691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4692                         <actions>
4693                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4694                                 <retrieve/>
4695                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4696                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4697                         </actions>
4698                 </permacrud>
4699         </class>
4700
4701         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4702                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4703                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4704                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4705                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4706                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4707                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4709                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4710                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4711                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4712                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4715                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4716                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4717                 </fields>
4718                 <links>
4719                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4722                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4723                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4724                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4725                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4726                 </links>
4727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4728                         <actions>
4729                                 <create permission="ADMIN_SERIAL_ITEM">
4730                                         <context link="stream" jump="distribution" field="holding_lib" />
4731                                 </create>
4732                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4733                                         <context link="stream" jump="distribution" field="holding_lib" />
4734                                 </retrieve>
4735                                 <update permission="ADMIN_SERIAL_ITEM">
4736                                         <context link="stream" jump="distribution" field="holding_lib" />
4737                                 </update>
4738                                 <delete permission="ADMIN_SERIAL_ITEM">
4739                                         <context link="stream" jump="distribution" field="holding_lib" />
4740                                 </delete>
4741                         </actions>
4742                 </permacrud>
4743         </class>
4744
4745         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4748                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4749                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4750                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4751                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4752                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4753                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4754                 </fields>
4755                 <links>
4756                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4757                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4758                 </links>
4759                 <!-- Not available via PCRUD at this time -->
4760         </class>
4761         <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">
4762                 <fields>
4763                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4764                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4765                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4766                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4767                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4768                 </fields>
4769                 <links>
4770                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4771                 </links>
4772         </class>
4773         <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">
4774                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4775                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4776                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4777                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4778                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4779                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4780                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4781                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4782                 </fields>
4783                 <links>
4784                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4785                 </links>
4786         </class>
4787         <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">
4788                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4789                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4790                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4791                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4792                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4793                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4794                 </fields>
4795                 <links>
4796                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4797                 </links>
4798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4799                         <actions>
4800                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4801                                         <context link="distribution" field="holding_lib" />
4802                                 </create>
4803                                 <retrieve/>
4804                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4805                                         <context link="distribution" field="holding_lib" />
4806                                 </update>
4807                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4808                                         <context link="distribution" field="holding_lib" />
4809                                 </delete>
4810                         </actions>
4811                 </permacrud>
4812         </class>
4813
4814         <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">
4815                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4816                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4817                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4818                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4819                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4820                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4821                 </fields>
4822                 <links>
4823                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4824                 </links>
4825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4826                         <actions>
4827                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4828                                         <context link="distribution" field="holding_lib" />
4829                                 </create>
4830                                 <retrieve/>
4831                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4832                                         <context link="distribution" field="holding_lib" />
4833                                 </update>
4834                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4835                                         <context link="distribution" field="holding_lib" />
4836                                 </delete>
4837                         </actions>
4838                 </permacrud>
4839         </class>
4840
4841         <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">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4843                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4844                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4845                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4846                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4847                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4848                 </fields>
4849                 <links>
4850                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4851                 </links>
4852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4853                         <actions>
4854                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4855                                         <context link="distribution" field="holding_lib" />
4856                                 </create>
4857                                 <retrieve/>
4858                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4859                                         <context link="distribution" field="holding_lib" />
4860                                 </update>
4861                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4862                                         <context link="distribution" field="holding_lib" />
4863                                 </delete>
4864                         </actions>
4865                 </permacrud>
4866         </class>
4867
4868         <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">
4869                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4870                         <field name="id" reporter:datatype="id" />
4871                         <field name="owning_copy" reporter:datatype="link"/>
4872                         <field name="stat_cat" reporter:datatype="link"/>
4873                         <field name="stat_cat_entry" reporter:datatype="link"/>
4874                 </fields>
4875                 <links>
4876                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4877                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4878                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4879                 </links>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="code">
4883                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4884                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4885                 </fields>
4886                 <links/>
4887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4888             <actions>
4889                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4890                 <retrieve/>
4891                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4892                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4893             </actions>
4894         </permacrud>
4895         </class>
4896         <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">
4897                 <fields oils_persist:primary="code">
4898                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4899                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4900                 </fields>
4901                 <links/>
4902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4903             <actions>
4904                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4905                 <retrieve/>
4906                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4907                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4908             </actions>
4909         </permacrud>
4910         </class>
4911         <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">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4913                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4914                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4915                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4916                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4917                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4918                 </fields>
4919                 <links>
4920             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4921         </links>
4922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4923             <actions>
4924                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4925                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4926                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4927                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4928             </actions>
4929         </permacrud>
4930         </class>
4931         <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">
4932                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4933                         <field name="id" reporter:datatype="id" />
4934                         <field name="name" reporter:datatype="text"/>
4935                 </fields>
4936                 <links/>
4937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4938             <actions>
4939                 <create permission="CREATE_LASSO" global_required="true"/>
4940                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4941                 <update permission="UPDATE_LASSO" global_required="true"/>
4942                 <delete permission="DELETE_LASSO" global_required="true"/>
4943             </actions>
4944         </permacrud>
4945         </class>
4946         <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">
4947                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4948                         <field name="id" reporter:datatype="id" />
4949                         <field name="lasso" reporter:datatype="link"/>
4950                         <field name="org_unit" reporter:datatype="org_unit"/>
4951                 </fields>
4952                 <links>
4953                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4954                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4955                 </links>
4956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957             <actions>
4958                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4959                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4960                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4961                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4962             </actions>
4963         </permacrud>
4964         </class>
4965         <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">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4967                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4968                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4969                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4970                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4971                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4972                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4973                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4974                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4975                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4976                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4977                 </fields>
4978                 <links>
4979                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4980                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4983                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4984                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4985                 </links>
4986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987             <actions>
4988                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4989                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4990                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4991                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4992             </actions>
4993         </permacrud>
4994         </class>
4995         <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">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4997                         <field name="id" reporter:datatype="id" />
4998                         <field name="from_org" reporter:datatype="org_unit"/>
4999                         <field name="to_org" reporter:datatype="org_unit"/>
5000                         <field name="prox" reporter:datatype="int" />
5001                 </fields>
5002                 <links>
5003                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5004                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5005                 </links>
5006         </class>
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5009                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5010                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5011                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5012                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5013                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5014                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5015                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5016                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5017                 </fields>
5018                 <links/>
5019         </class>
5020         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5022                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5023                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5025                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5026                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5027                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5028                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5029                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5030                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5031                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5032                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5034                 </fields>
5035                 <links>
5036                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5037                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5038                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5039                 </links>
5040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5041             <actions>
5042                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5043                 <retrieve/>
5044                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5045                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5046             </actions>
5047         </permacrud>
5048         </class>
5049         <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">
5050                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5051                         <field name="address_type"  reporter:datatype="text"/>
5052                         <field name="city"  reporter:datatype="text"/>
5053                         <field name="country"  reporter:datatype="text"/>
5054                         <field name="county"  reporter:datatype="text"/>
5055                         <field name="id" reporter:datatype="id" />
5056                         <field name="org_unit" reporter:datatype="org_unit"/>
5057                         <field name="post_code"  reporter:datatype="text"/>
5058                         <field name="state"  reporter:datatype="text"/>
5059                         <field name="street1"  reporter:datatype="text"/>
5060                         <field name="street2"  reporter:datatype="text"/>
5061                         <field name="valid" reporter:datatype="bool"/>
5062                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5063                 </fields>
5064                 <links>
5065                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5066                 </links>
5067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5068             <actions>
5069                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5070                 <retrieve/>
5071                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5072                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5073             </actions>
5074         </permacrud>
5075         </class>
5076         <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">
5077                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5078                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5079                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5080                         <field name="query_text" reporter:datatype="text"/>
5081                 </fields>
5082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5083             <actions>
5084                 <retrieve/>
5085             </actions>
5086         </permacrud>
5087         </class>
5088
5089         <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">
5090                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5091                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5092                         <field name="owner" reporter:datatype="org_unit"/>
5093                         <field name="code" reporter:datatype="text"/>
5094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5095                         <field name="create_date" reporter:datatype="timestamp"/>
5096                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5097                 </fields>
5098                 <links>
5099                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5100                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5101                 </links>
5102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5103             <actions>
5104                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5105                 <retrieve/>
5106                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5107                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5108             </actions>
5109         </permacrud>
5110         </class>
5111         <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">
5112                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5113                         <field name="id" reporter:datatype="id"/>
5114                         <field name="grp" reporter:datatype="link"/>
5115                         <field name="pos" reporter:datatype="int"/>
5116                         <field name="query" reporter:datatype="link"/>
5117                 </fields>
5118                 <links>
5119                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5120                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5121                 </links>
5122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123             <actions>
5124                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5125                     <context link="grp" field="owner"/>
5126                 </create>
5127                 <retrieve/>
5128                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5129                     <context link="grp" field="owner"/>
5130                 </update>
5131                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5132                     <context link="grp" field="owner"/>
5133                 </delete>
5134             </actions>
5135         </permacrud>
5136         </class>
5137
5138         <!-- A note: Please update alhr and ahopl when updating ahr -->
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5141                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5142                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5143                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5145                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5146                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5147                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5148                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5149                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5151                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5152                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5153                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5154                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5155                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5156                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5159                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5161                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5162                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5163                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5164                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5165                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5166                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5168                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5172                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5175                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5176                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5177                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5178                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5180                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5181                 </fields>
5182                 <links>
5183                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5184                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5187                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5190                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5192                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5193                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5194                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5195                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5196                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5197                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5199                 </links>
5200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5201                         <actions>
5202                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5203                         </actions>
5204                 </permacrud>
5205         </class>
5206         <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">
5207                 <oils_persist:source_definition><![CDATA[
5208                 SELECT
5209                         ahr.*,
5210                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5211                                 copy_location_order_position,
5212                         CASE WHEN au.alias IS NOT NULL THEN
5213                                 au.alias
5214                         ELSE
5215                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5216                                         COALESCE(au.family_name, ''),
5217                                         COALESCE(au.suffix, ''),
5218                                         ', ',
5219                                         COALESCE(au.prefix, ''),
5220                                         COALESCE(au.first_given_name, ''),
5221                                         COALESCE(au.second_given_name, '')
5222                                 ], ' '), E'\\s+,', ',')
5223                         END AS usr_display_name,
5224                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5225                                 AS call_number_label,
5226                         siss.label AS issuance_label,
5227                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5228                         ahcm_1.copy_count AS potential_copies
5229                 FROM action.hold_request ahr
5230                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5231                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5232                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5233                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5234                 JOIN actor.usr au ON (au.id = ahr.usr)
5235                 JOIN (
5236                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5237                         FROM asset.copy_location
5238                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5239                 LEFT JOIN actor.usr_standing_penalty ausp 
5240                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5241                 LEFT JOIN config.standing_penalty csp
5242                         ON (
5243                                 csp.id = ausp.standing_penalty AND 
5244                                 csp.block_list LIKE '%CAPTURE%' AND (
5245                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5246                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5247                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5248                                         )
5249                                 )
5250                         )
5251                 JOIN (
5252                         SELECT COUNT(target_copy) AS copy_count, hold
5253                         FROM action.hold_copy_map
5254                         GROUP BY 2
5255                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5256                 LEFT JOIN serial.issuance siss
5257                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5258                 LEFT JOIN asset.copy_location_order acplo
5259                         ON (acp.location = acplo.location AND
5260                                 acp.circ_lib = acplo.org)
5261                 WHERE
5262                         ahr.capture_time IS NULL AND
5263                         ahr.cancel_time IS NULL AND
5264                         csp.id IS NULL AND
5265                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5266                 ]]></oils_persist:source_definition>
5267                 <fields oils_persist:primary="id">
5268                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5269                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5270                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5271                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5272                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5273                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5274                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5275                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5276                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5277                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5278                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5279                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5280                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5281                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5282                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5283                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5284                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5286                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5287                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5288                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5289                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5290                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5291                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5292                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5293                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5294                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5295                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5296                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5297                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5298                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5299                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5300                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5301                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5302                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5303                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5304                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5305                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5306                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5307                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5308                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5309                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5310                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5311                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5312                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5313                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5314                 </fields>
5315                 <links>
5316                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5317                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5318                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5319                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5320                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5321                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5322                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5323                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5324                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5325                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5326                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5327                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5328                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5329                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5330                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5331                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5332                 </links>
5333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5334                         <actions>
5335                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5336                         </actions>
5337                 </permacrud>
5338         </class>
5339         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5340                 <oils_persist:source_definition>
5341                         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)
5342                 </oils_persist:source_definition>
5343                 <fields oils_persist:primary="id">
5344                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5345                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5346                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5347                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5348                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5349                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5350                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5351                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5352                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5353                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5354                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5355                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5356                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5357                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5358                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5359                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5360                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5361                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5362                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5363                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5364                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5365                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5366                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5367                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5368                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5369                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5370                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5371                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5372                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5373                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5374                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5375                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5376                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5377                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5378                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5379                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5380                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5381                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5382                 </fields>
5383                 <links>
5384                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5385                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5386                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5387                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5388                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5389                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5390                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5391                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5392                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5393                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5394                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5395                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5396                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5397                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5398                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5399                 </links>
5400         </class>
5401
5402         <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">
5403                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5405                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5406                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5407                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5408                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5409                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5410                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5411                 </fields>
5412                 <links>
5413                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5414                 </links>
5415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416                         <actions>
5417                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5418                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5419                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5420                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5421                         </actions>
5422                 </permacrud>
5423         </class>
5424         <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">
5425                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5426                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5427                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5428                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5429                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5430                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5431                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5432                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5433                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5434                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5435                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5436                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5437                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5438                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5439                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5440                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5441                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5442                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5443                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5444                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5445                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5446                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5447                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5448                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5449                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5452                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5453                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5454                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5455                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5456                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5457                 </fields>
5458                 <links>
5459                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5460                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5461                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5462                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5463                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5464                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5465                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5466                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5467                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5468                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5469                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5470                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5471                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5472                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5473                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5474                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5475                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5476                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5477                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5478                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5479                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5480                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5481                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5482                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5483                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5484                 </links>
5485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5486             <actions>
5487                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5488                 <retrieve />
5489                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5490                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5491             </actions>
5492         </permacrud>
5493         </class>
5494         <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">
5495                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5496                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5497                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5498                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5499                 </fields>
5500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5501                         <actions>
5502                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5503                                 <retrieve/>
5504                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5505                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5506                         </actions>
5507                 </permacrud>
5508         </class>
5509         <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">
5510                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5511                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5512                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5513                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5514                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5515                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5516                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5517                 </fields>
5518                 <links>
5519                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5520                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5521                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5522                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5523                 </links>
5524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5525                         <actions>
5526                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5527                                 <retrieve/>
5528                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5529                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5530                         </actions>
5531                 </permacrud>
5532         </class>
5533         <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">
5534                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5535                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field name="btype" reporter:datatype="text"/>
5537                         <field name="id" reporter:datatype="id" />
5538                         <field name="name"  reporter:datatype="text"/>
5539                         <field name="description" reporter:datatype="text"/>
5540                         <field name="owner" reporter:datatype="link"/>
5541                         <field name="pub" reporter:datatype="bool"/>
5542                         <field name="create_time" reporter:datatype="timestamp" />
5543                 </fields>
5544                 <links>
5545                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5546                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5547                 </links>
5548         </class>
5549         <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">
5550                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5551                         <field name="id" reporter:datatype="id" />
5552                         <field name="bucket" reporter:datatype="link"/>
5553                         <field name="note" reporter:datatype="text" />
5554                 </fields>
5555                 <links>
5556                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5557                 </links>
5558         </class>
5559         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5560                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5561                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5562                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5563                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5564                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5565                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5566                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5567                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5568                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5569                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5570                 </fields>
5571                 <links>
5572                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5573                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5574                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5575                 </links>
5576         </class>
5577         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5578                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5579                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5580                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5581                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5582                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5583                 </fields>
5584                 <links>
5585                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5586                 </links>
5587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5588                         <actions>
5589                                 <retrieve permission="VIEW_USER">
5590                                         <context link="usr" field="home_ou" />
5591                                 </retrieve>
5592                         </actions>
5593                 </permacrud>
5594         </class>
5595     <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">
5596         <fields oils_persist:primary="field">
5597             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5598             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5599             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5600         </fields>
5601         <links/>
5602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5603             <actions>
5604                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5605                 <retrieve />
5606                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5607                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5608             </actions>
5609         </permacrud>
5610     </class>
5611         <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">
5612                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5613                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5614                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5615                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5616                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5617                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5618                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5619                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5620                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5621                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5622                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5623                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5624                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5625                 </fields>
5626                 <links>
5627                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5628                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5629                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5630                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5631                 </links>
5632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5633             <actions>
5634                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5635                 <retrieve />
5636                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5637                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5638             </actions>
5639         </permacrud>
5640         </class>
5641         <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">
5642                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5643                         <field name="field" reporter:datatype="link"/>
5644                         <field name="id" reporter:datatype="id" />
5645                         <field name="source" reporter:datatype="link"/>
5646                         <field name="value"  reporter:datatype="text"/>
5647                 </fields>
5648                 <links>
5649                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5650                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5651                 </links>
5652         </class>
5653         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5655                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5656                         <field name="btype" reporter:datatype="text"/>
5657                         <field name="id" reporter:datatype="id" />
5658                         <field name="name"  reporter:datatype="text"/>
5659                         <field name="description" reporter:datatype="text"/>
5660                         <field name="owner" reporter:datatype="link"/>
5661                         <field name="pub" reporter:datatype="bool"/>
5662                         <field name="create_time" reporter:datatype="timestamp" />
5663                 </fields>
5664                 <links>
5665                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5666                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5667                 </links>
5668         </class>
5669         <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">
5670                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5671                         <field name="id" reporter:datatype="id" />
5672                         <field name="bucket" reporter:datatype="link"/>
5673                         <field name="note" reporter:datatype="text" />
5674                 </fields>
5675                 <links>
5676                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5677                 </links>
5678         </class>
5679         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5680                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5681                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5682                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5683                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5684                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5685                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5686                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5687                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5688                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5689                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5690                 </fields>
5691                 <links>
5692                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5693                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5694                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5695                 </links>
5696         </class>
5697         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5698                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5699                         <field name="id" reporter:datatype="id" />
5700                         <field name="ind1" />
5701                         <field name="ind2" />
5702                         <field name="record" />
5703                         <field name="subfield" />
5704                         <field name="tag" />
5705                         <field name="value" />
5706                 </fields>
5707                 <links>
5708                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5709                 </links>
5710         </class>
5711         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5712                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5713                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5714                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5715                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5716                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5717                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5718                 </fields>
5719                 <links>
5720                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5721                 </links>
5722         </class>
5723         <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">
5724                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5725                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5726                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5727                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5728                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5729                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5730                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5731                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5732                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5733                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5734                 </fields>
5735                 <links>
5736                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5737                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5738                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5739                 </links>
5740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741             <actions>
5742                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5743                 <retrieve/>
5744                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5745                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5746             </actions>
5747         </permacrud>
5748         </class>
5749         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5750                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5751                         <field name="create_date" reporter:datatype="timestamp"/>
5752                         <field name="creator" reporter:datatype="link"/>
5753                         <field name="edit_date" reporter:datatype="timestamp"/>
5754                         <field name="editor" reporter:datatype="link"/>
5755                         <field name="id" reporter:datatype="id" />
5756                         <field name="pub" reporter:datatype="bool"/>
5757                         <field name="record" reporter:datatype="link"/>
5758                         <field name="value"  reporter:datatype="text"/>
5759                 </fields>
5760                 <links>
5761                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5762                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5763                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5764                 </links>
5765         </class>
5766         <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">
5767                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5768                         <field name="balance_owed" reporter:datatype="money" />
5769                         <field name="total_owed" reporter:datatype="money" />
5770                         <field name="total_paid" reporter:datatype="money" />
5771                         <field name="usr" reporter:datatype="link"/>
5772                 </fields>
5773                 <links>
5774                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5775                 </links>
5776         </class>
5777         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5778                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5779                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5780                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5781                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5782                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5783                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5784                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5785                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5786                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5787                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5788                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5789                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5790                 </fields>
5791                 <links>
5792                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5793                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5794                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5795                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5796                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5798                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5799                 </links>
5800         </class>
5801         <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">
5802                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5803                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5804                         <field name="quality" reporter:datatype="int" />
5805                         <field name="source" reporter:datatype="text"/>
5806                         <field name="transcendant" reporter:datatype="bool"/>
5807                         <field name="can_have_copies" reporter:datatype="bool"/>
5808                 </fields>
5809                 <links/>
5810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5811             <actions>
5812                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5813                 <retrieve/>
5814                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5815                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5816             </actions>
5817         </permacrud>
5818         </class>
5819         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5820                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5821                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5822                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5823                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5824                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5825                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5826                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5827                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5828                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5829                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5830                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5831                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5832                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5833                 </fields>
5834                 <links>
5835                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5836                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5837                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5838                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5839                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5840                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5841                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5842                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5843                 </links>
5844         </class>
5845         <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">
5846                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5847                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5848                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5849                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5850                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5851                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5852                 </fields>
5853                 <links>
5854                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5855                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5856                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5857                 </links>
5858         </class>
5859         <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">
5860                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5861                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5862                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5863                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5864                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5865                 </fields>
5866                 <links>
5867                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5868                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5869                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5870                 </links>
5871         </class>
5872         <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">
5873                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5874                         <field name="bucket" reporter:datatype="link"/>
5875                         <field name="id" reporter:datatype="id" />
5876                         <field name="target_user" reporter:datatype="link"/>
5877                         <field name="create_time" reporter:datatype="timestamp" />
5878                         <field name="pos" reporter:datatype="int" />
5879                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5880                 </fields>
5881                 <links>
5882                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5883                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5884             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5885                 </links>
5886         </class>
5887         <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">
5888                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5889                         <field name="id" reporter:datatype="id" />
5890                         <field name="item" reporter:datatype="link"/>
5891                         <field name="note" reporter:datatype="text" />
5892                 </fields>
5893                 <links>
5894                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5895                 </links>
5896         </class>
5897         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5898                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5899                         <field name="balance_owed" reporter:datatype="money" />
5900                         <field name="total_owed" reporter:datatype="money" />
5901                         <field name="total_paid" reporter:datatype="money" />
5902                         <field name="usr" reporter:datatype="link"/>
5903                 </fields>
5904                 <links>
5905                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5906                 </links>
5907         </class>
5908         <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">
5909                 <fields oils_persist:primary="code" oils_persist:sequence="">
5910                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5911                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5912                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5913                 </fields>
5914                 <links/>
5915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5916             <actions>
5917                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5918                 <retrieve/>
5919                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5920                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5921             </actions>
5922         </permacrud>
5923         </class>
5924         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5925                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5926                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5927                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5928                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5929                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5930                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5931                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5932                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5933                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5934                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5935                 </fields>
5936                 <links>
5937                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5938                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5939                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5940                 </links>
5941         </class>
5942         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5943                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5944                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5945                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5946                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5947                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5948                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5949                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5950                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5951                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5952                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5953                 </fields>
5954                 <links>
5955                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5956                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5957                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5958                 </links>
5959         </class>
5960         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5961                 <fields oils_persist:primary="id" oils_persist:sequence="">
5962                         <field name="checkin_lib" reporter:datatype="link"/>
5963                         <field name="checkin_staff" reporter:datatype="link"/>
5964                         <field name="checkin_time" reporter:datatype="timestamp"/>
5965                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5966                         <field name="circ_staff" reporter:datatype="link"/>
5967                         <field name="desk_renewal" reporter:datatype="bool"/>
5968                         <field name="due_date" reporter:datatype="timestamp"/>
5969                         <field name="duration" reporter:datatype="interval"/>
5970                         <field name="duration_rule" reporter:datatype="link"/>
5971                         <field name="fine_interval" reporter:datatype="interval"/>
5972                         <field name="id" reporter:datatype="id" />
5973                         <field name="max_fine" reporter:datatype="money" />
5974                         <field name="max_fine_rule" reporter:datatype="link"/>
5975                         <field name="opac_renewal" reporter:datatype="bool"/>
5976                         <field name="phone_renewal" reporter:datatype="bool"/>
5977                         <field name="recurring_fine" reporter:datatype="money" />
5978                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5979                         <field name="renewal_remaining" reporter:datatype="int" />
5980             <field name="grace_period" reporter:datatype="interval" />
5981                         <field name="stop_fines" reporter:datatype="text"/>
5982                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5983                         <field name="target_copy" reporter:datatype="link"/>
5984                         <field name="usr" reporter:datatype="link"/>
5985                         <field name="xact_finish" reporter:datatype="timestamp" />
5986                         <field name="xact_start" reporter:datatype="timestamp" />
5987                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5988                 </fields>
5989                 <links>
5990                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5991                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5992                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5993                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5994                 </links>
5995         </class>
5996         <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">
5997                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5998                         <field name="field" reporter:datatype="link"/>
5999                         <field name="id" reporter:datatype="id" />
6000                         <field name="source" reporter:datatype="link"/>
6001                         <field name="value" reporter:datatype="text"/>
6002                 </fields>
6003                 <links>
6004                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6005                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6006                 </links>
6007         </class>
6008         <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">
6009                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6010                         <field name="high" reporter:datatype="money" />
6011                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6012                         <field name="low" reporter:datatype="money" />
6013                         <field name="name" reporter:datatype="text"/>
6014                         <field name="normal" reporter:datatype="money" />
6015                         <field name="recurrence_interval" reporter:datatype="interval"/>
6016             <field name="grace_period" reporter:datatype="interval" />
6017                 </fields>
6018                 <links/>
6019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6020             <actions>
6021                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6022                 <retrieve/>
6023                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6024                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6025             </actions>
6026         </permacrud>
6027         </class>
6028         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6029                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6030                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6031                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6032                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6033                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6034                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6035                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6036                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6037                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6038                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6039                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6040                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6041                 </fields>
6042                 <links>
6043                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6044                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6045                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6046                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6047                 </links>
6048         </class>
6049         <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">
6050                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6051                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6052                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6053                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6054                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6055                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6056                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6057                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6058                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6059                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6060                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6061                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6062                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6063                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6064                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6065                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6066                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6067                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6068                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6069                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6070                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6071                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6072                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6073                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6074                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6075                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6076                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6077                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6078                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6079                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6080                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6081                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6082                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6083                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6084                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6085                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6086                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6087                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6088                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6089                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6090                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6093                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6094                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6095                 </fields>
6096                 <links>
6097                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6098                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6099                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6100                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6101                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6102                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6103                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6104                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6105                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6106                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6107                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6108                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6109                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6110                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6111                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6112                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6113                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6114                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6115                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6116                 </links>
6117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6118             <actions>
6119                 <create permission="CREATE_COPY">
6120                     <context link="call_number" field="owning_lib"/>
6121                 </create>
6122                 <retrieve/>
6123                 <update permission="UPDATE_COPY">
6124                     <context link="call_number" field="owning_lib"/>
6125                 </update>
6126                 <delete permission="DELETE_COPY">
6127                     <context link="call_number" field="owning_lib"/>
6128                 </delete>
6129             </actions>
6130         </permacrud>
6131         </class>
6132
6133         <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">
6134                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6135                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6136                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6137                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6138                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6139                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6140                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6141                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6142                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6143                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6144                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6145                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6146                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6147                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6148                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6149                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6150                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6151                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6152                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6153                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6154                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6155                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6156                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6157                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6158                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6159                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6160                 </fields>
6161                 <links>
6162                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6163                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6164                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6165                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6166                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6167                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6168                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6169                 </links>
6170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6171                         <actions>
6172                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6173                                 <retrieve />
6174                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6175                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6176                         </actions>
6177                 </permacrud>
6178         </class>
6179
6180         <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">
6181                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6182                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6183                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6184                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6185                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6186                 </fields>
6187                 <links/>
6188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6189             <actions>
6190                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6191                 <retrieve/>
6192                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6193                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6194             </actions>
6195         </permacrud>
6196         </class>
6197         <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">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6199                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6200                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6201                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6202                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6203                 </fields>
6204                 <links/>
6205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6206             <actions>
6207                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6208                 <retrieve/>
6209                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6210                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6211             </actions>
6212         </permacrud>
6213         </class>
6214         <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">
6215                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6216                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6218                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6219                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6220                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6221                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6222                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6223                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6224                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6225                 </fields>
6226                 <links>
6227                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6228                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6229                 </links>
6230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6231             <actions>
6232                 <create permission="CREATE_PERM" global_required="true"/>
6233                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6234                 <update permission="UPDATE_PERM" global_required="true"/>
6235                 <delete permission="DELETE_PERM" global_required="true"/>
6236             </actions>
6237         </permacrud>
6238         </class>
6239         <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">
6240                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6241                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6242                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6243                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6244                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6245                 </fields>
6246                 <links>
6247                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6248                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6249                 </links>
6250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6251             <actions>
6252                 <create permission="ADMIN_SURVEY">
6253                     <context link="question" jump="survey" field="owner"/>
6254                 </create>
6255                 <retrieve/>
6256                 <update permission="ADMIN_SURVEY">
6257                     <context link="question" jump="survey" field="owner"/>
6258                 </update>
6259                 <delete permission="ADMIN_SURVEY">
6260                     <context link="question" jump="survey" field="owner"/>
6261                 </delete>
6262             </actions>
6263         </permacrud>
6264         </class>
6265         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6266                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6267                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6268                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6269                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6270                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6271                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6272                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6273                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6274                 </fields>
6275                 <links>
6276                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6277                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6278                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6279                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6280                 </links>
6281         </class>
6282         <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">
6283                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6284                         <field name="balance_owed" reporter:datatype="money" />
6285                         <field name="total_owed" reporter:datatype="money" />
6286                         <field name="total_paid" reporter:datatype="money" />
6287                         <field name="usr" reporter:datatype="link"/>
6288                 </fields>
6289                 <links>
6290                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6291                 </links>
6292         </class>
6293         <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">
6294                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6295                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6296                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6297                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6298                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6299                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6300                 </fields>
6301                 <links>
6302                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6303                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6304                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6305                 </links>
6306         </class>
6307         <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">
6308                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6309                         <field name="field" reporter:datatype="link"/>
6310                         <field name="id" reporter:datatype="id" />
6311                         <field name="source" reporter:datatype="link"/>
6312                         <field name="value" reporter:datatype="text"/>
6313                 </fields>
6314                 <links>
6315                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6316                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6317                 </links>
6318         </class>
6319         <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">
6320                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6321                         <field name="field" reporter:datatype="link"/>
6322                         <field name="id" reporter:datatype="id" />
6323                         <field name="source" reporter:datatype="link"/>
6324                         <field name="value" reporter:datatype="text"/>
6325                 </fields>
6326                 <links>
6327                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6328                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6329                 </links>
6330         </class>
6331         <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">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6333                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6334                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6335                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6336                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6337                 </fields>
6338                 <links>
6339                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6340                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6341                 </links>
6342         </class>
6343         <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">
6344                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6345                         <field name="depth" reporter:datatype="int" />
6346                         <field name="grantable" reporter:datatype="bool"/>
6347                         <field name="grp" reporter:datatype="link"/>
6348                         <field name="id" reporter:datatype="id" />
6349                         <field name="perm" reporter:datatype="link"/>
6350                 </fields>
6351                 <links>
6352                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6353                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6354                 </links>
6355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6356             <actions>
6357                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6358                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6359                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6360                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6361             </actions>
6362         </permacrud>
6363         </class>
6364         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6365                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6366                         <field name="items" oils_persist:virtual="true" />
6367                         <field name="btype" reporter:datatype="text"/>
6368                         <field name="id" reporter:datatype="id" />
6369                         <field name="name" reporter:datatype="text"/>
6370                         <field name="description" reporter:datatype="text"/>
6371                         <field name="owner" reporter:datatype="link"/>
6372                         <field name="pub" reporter:datatype="bool"/>
6373                         <field name="create_time" reporter:datatype="timestamp" />
6374                 </fields>
6375                 <links>
6376                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6377                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6378                 </links>
6379         </class>
6380         <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">
6381                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6382                         <field name="id" reporter:datatype="id" />
6383                         <field name="bucket" reporter:datatype="link"/>
6384                         <field name="note" reporter:datatype="text" />
6385                 </fields>
6386                 <links>
6387                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6388                 </links>
6389         </class>
6390         <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">
6391                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6392                         <field name="id" reporter:datatype="int" />
6393                         <field name="usr" reporter:datatype="link"/>
6394                         <field name="work_ou" reporter:datatype="link"/>
6395                 </fields>
6396                 <links>
6397                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6398                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6399                 </links>
6400         </class>
6401         <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">
6402                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6403                         <field name="depth" reporter:datatype="int"/>
6404                         <field name="grantable" reporter:datatype="bool"/>
6405                         <field name="id" reporter:datatype="id" />
6406                         <field name="perm" reporter:datatype="link"/>
6407                         <field name="usr" reporter:datatype="link"/>
6408                 </fields>
6409                 <links>
6410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6411                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6412                 </links>
6413         </class>
6414         <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">
6415                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6416                         <field name="object_id" reporter:datatype="text"/>
6417                         <field name="grantable" reporter:datatype="bool"/>
6418                         <field name="id" reporter:datatype="id" />
6419                         <field name="perm" reporter:datatype="link"/>
6420                         <field name="usr" reporter:datatype="link"/>
6421                         <field name="object_type" reporter:datatype="text"/>
6422                 </fields>
6423                 <links>
6424                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6425                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6426                 </links>
6427         </class>
6428         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6429                 <fields oils_persist:primary="id" oils_persist:sequence="">
6430                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6431                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6432                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6433                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6434                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6435                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6436                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6437                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6438                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6439                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6440                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6441                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6442                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6443                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6444                 </fields>
6445                 <links>
6446                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6447                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6448                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6449                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6450                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6451                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6452                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6453                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6454                 </links>
6455         </class>
6456         <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">
6457                 <fields oils_persist:primary="id" oils_persist:sequence="">
6458                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6459                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6460                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6461                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6462                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6463                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6464                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6465                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6466                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6467                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6468                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6469                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6470                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6471                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6472                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6473                 </fields>
6474                 <links>
6475                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6476                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6477                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6478                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6479                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6480                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6481                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6482                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6483                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6484                 </links>
6485         </class>
6486         <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">
6487                 <fields oils_persist:primary="id" oils_persist:sequence="">
6488                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6489                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6490                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6491                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6492                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6493                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6494                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6495                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6496                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6497                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6498                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6499                 </fields>
6500                 <links>
6501                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6502                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6503                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6504                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6505                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6506                 </links>
6507         </class>
6508         <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">
6509                 <fields oils_persist:primary="id" oils_persist:sequence="">
6510                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6511                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6512                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6513                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6514                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6515                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6516                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6517                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6518                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6519                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6521                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6522                 </fields>
6523                 <links>
6524                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6525                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6526                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6527                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6528                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6529                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6530                 </links>
6531         </class>
6532         <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">
6533                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6534                         <field name="bucket" reporter:datatype="link"/>
6535                         <field name="id" reporter:datatype="id" />
6536                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6537                         <field name="create_time" reporter:datatype="timestamp" />
6538                         <field name="pos" reporter:datatype="int" />
6539                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6540                 </fields>
6541                 <links>
6542                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6543                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6544             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6545                 </links>
6546         </class>
6547         <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">
6548                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6549                         <field name="id" reporter:datatype="id" />
6550                         <field name="item" reporter:datatype="link"/>
6551                         <field name="note" reporter:datatype="text" />
6552                 </fields>
6553                 <links>
6554                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6555                 </links>
6556         </class>
6557         <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">
6558                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6559                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6560                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6561                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6562                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6563                 </fields>
6564                 <links>
6565                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6566                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6567                 </links>
6568         </class>
6569     <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">
6570         <fields oils_persist:primary="field">
6571             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6572             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6573             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6574         </fields>
6575         <links/>
6576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6577             <actions>
6578                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6579                 <retrieve />
6580                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6581                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6582             </actions>
6583         </permacrud>
6584     </class>
6585         <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">
6586                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6587                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6588                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6589                 </fields>
6590                 <links/>
6591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6592             <actions>
6593                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6594                 <retrieve/>
6595                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6596                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6597             </actions>
6598         </permacrud>
6599         </class>
6600
6601
6602         <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">
6603                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6604                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6605                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6606                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6607                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6608                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6609                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6610                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6611                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6612                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6613                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6614                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6615                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6616                 </fields>
6617                 <links>
6618                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6619                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6620                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6621                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6622                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6623                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6624                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6625                 </links>
6626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6627             <actions>
6628                 <create permission="TRANSIT_COPY">
6629                     <context link="target_copy" field="owner"/>
6630                 </create>
6631                 <retrieve/>
6632                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6633                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6634             </actions>
6635         </permacrud>
6636         </class>
6637         <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">
6638                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6639                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6640                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6641                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6642                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6643                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6644                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6645                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6646                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6647                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6648                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6649                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6650                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6651                 </fields>
6652                 <links>
6653                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6654                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6655                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6656                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6657                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6658                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6659                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6660                 </links>
6661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6662             <actions>
6663                 <create permission="TRANSIT_COPY" context_field="owner">
6664                     <context link="target_copy" field="circ_lib"/>
6665                 </create>
6666                 <retrieve/>
6667                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6668                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6669             </actions>
6670         </permacrud>
6671         </class>
6672         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6673                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6674                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6675                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6676                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6677                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6678                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6679                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6680                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6681                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6682                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6683                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6684                 </fields>
6685                 <links>
6686                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6687                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6688                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6689                 </links>
6690         </class>
6691         <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">
6692                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6693                         <field name="grp" />
6694                         <field name="id" reporter:datatype="id" />
6695                         <field name="usr" />
6696                 </fields>
6697                 <links>
6698                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6699                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6700                 </links>
6701         </class>
6702         <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">
6703                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6704                         <field name="id" reporter:datatype="id" />
6705                         <field name="fq_field" reporter:datatype="text"/>
6706                         <field name="identity_value" reporter:datatype="text"/>
6707                         <field name="translation" reporter:datatype="text"/>
6708                         <field name="string" reporter:datatype="text"/>
6709                 </fields>
6710                 <links>
6711                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6712                 </links>
6713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6714             <actions>
6715                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6716                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6717                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6718                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6719             </actions>
6720         </permacrud>
6721         </class>
6722         <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">
6723                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6724                         <field name="id" reporter:datatype="id" />
6725                         <field name="fm_class" reporter:datatype="text"/>
6726                         <field name="field" reporter:datatype="text"/>
6727                         <field name="owner" reporter:datatype="org_unit"/>
6728                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6729                 </fields>
6730                 <links>
6731                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6732                 </links>
6733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6734             <actions>
6735                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6736                 <retrieve/>
6737                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6738                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6739             </actions>
6740         </permacrud>
6741         </class>
6742         <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">
6743                 <fields oils_persist:primary="code">
6744                         <field name="code" reporter:datatype="id" />
6745                         <field name="marc_code" reporter:datatype="text"/>
6746                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6747                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6748                 </fields>
6749                 <links/>
6750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6751             <actions>
6752                 <create permission="CREATE_LOCALE" global_required="true"/>
6753                 <retrieve/>
6754                 <update permission="UPDATE_LOCALE" global_required="true"/>
6755                 <delete permission="DELETE_LOCALE" global_required="true"/>
6756             </actions>
6757         </permacrud>
6758         </class>
6759         <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">
6760                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6761                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6762                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6763                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6764             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6765                 </fields>
6766                 <links>
6767                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6768                 </links>
6769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6770             <actions>
6771                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6772                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6773                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6774                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6775             </actions>
6776         </permacrud>
6777         </class>
6778
6779         <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">
6780                 <fields oils_persist:primary="id">
6781                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6782                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6783                 </fields>
6784                 <links/>
6785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6786             <actions>
6787                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6788                 <retrieve/>
6789                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6790                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6791             </actions>
6792         </permacrud>
6793         </class>
6794
6795         <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">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6797                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6798                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6799                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6800                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6801                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6802                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6803                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6804                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6805                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6806                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6807                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6808                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6809                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6810                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6811                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6812                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6813                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6814                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6815                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6816                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6817                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6818                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6819                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6820                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6821                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6822                 </fields>
6823                 <links>
6824                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6825                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6826                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6827                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6828                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6829                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6830                 </links>
6831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6832             <actions>
6833                 <create permission="user_request.create">
6834                     <context link="usr" field="home_ou"/>
6835                                 </create>
6836                 <retrieve permission="user_request.view">
6837                     <context link="usr" field="home_ou"/>
6838                                 </retrieve>
6839                 <update permission="user_request.update">
6840                     <context link="usr" field="home_ou"/>
6841                                 </update>
6842                 <delete permission="user_request.delete">
6843                     <context link="usr" field="home_ou"/>
6844                                 </delete>
6845             </actions>
6846         </permacrud>
6847         </class>
6848
6849         <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">
6850                 <fields oils_persist:primary="code">
6851                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6852                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6853                 </fields>
6854                 <links/>
6855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6856             <actions>
6857                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6858                 <retrieve/>
6859                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6860                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6861             </actions>
6862         </permacrud>
6863         </class>
6864
6865         <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">
6866                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6867                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6868                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6869                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6870                         <field reporter:label="Ratio" name="ratio" />
6871                 </fields>
6872                 <links>
6873                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6874                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6875                 </links>
6876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6877                         <actions>
6878                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6879                                 <retrieve/>
6880                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6881                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6882                         </actions>
6883                 </permacrud>
6884         </class>
6885
6886         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6887                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6888                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6889                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6890                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6891                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6892                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6893                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6894                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6895                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6896                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6897                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6898                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6899                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6900                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6901                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6902                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6903                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6904                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
6905                 </fields>
6906                 <links>
6907                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6908                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6909             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6910             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6911             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6912                 </links>
6913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6914             <actions>
6915                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6916                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6917                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6918                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6919             </actions>
6920         </permacrud>
6921         </class>
6922
6923         <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">
6924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6925                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6926                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6927                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6928                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6929                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6930                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6931                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6932                 </fields>
6933                 <links>
6934                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6935                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6936                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6937                 </links>
6938         </class>
6939
6940         <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">
6941                 <fields oils_persist:primary="code">
6942                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6943                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6944                 </fields>
6945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6946             <actions>
6947                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6948                 <retrieve/>
6949                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6950                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6951             </actions>
6952                 </permacrud>
6953         </class>
6954
6955         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6956                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6957                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6958                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6959                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6960                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6961                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6962                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6963                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6964                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6965                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6966                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6967                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6968                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6969                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6970                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6971                 </fields>
6972                 <links>
6973                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6974                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6975                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6976                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6977                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6978                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6979                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6980                 </links>
6981         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6982             <actions>
6983                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6984                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6985                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6986                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6987             </actions>
6988         </permacrud>
6989         </class>
6990
6991         <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">
6992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6993                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6994                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6995                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6996                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6997                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6998                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6999                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7000                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7001                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7002                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7003                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7004                 </fields>
7005                 <links>
7006                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7007                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7008                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7009                 </links>
7010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7011             <actions>
7012                 <create   permission="ADMIN_INVOICE">
7013                                         <context link="invoice" field="receiver"/>
7014                                 </create>
7015                 <retrieve permission="ADMIN_INVOICE">
7016                                         <context link="invoice" field="receiver"/>
7017                                 </retrieve>
7018                 <update   permission="ADMIN_INVOICE">
7019                                         <context link="invoice" field="receiver"/>
7020                                 </update>
7021                                 <delete   permission="ADMIN_INVOICE">
7022                                         <context link="invoice" field="receiver"/>
7023                                 </delete>
7024             </actions>
7025         </permacrud>
7026         </class>
7027
7028         <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">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7030                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7031                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7032                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7033                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7034                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7035                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7036                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7037                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7038                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7039                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7040                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7041                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7042                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7043                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7044                 </fields>
7045                 <links>
7046                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7047                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7048                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7049                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7050                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7051                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7052                 </links>
7053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7054             <actions>
7055                 <create   permission="ADMIN_INVOICE">
7056                                         <context link="invoice" field="receiver"/>
7057                                 </create>
7058                 <retrieve permission="ADMIN_INVOICE">
7059                                         <context link="invoice" field="receiver"/>
7060                                 </retrieve>
7061                 <update   permission="ADMIN_INVOICE">
7062                                         <context link="invoice" field="receiver"/>
7063                                 </update>
7064                                 <delete   permission="ADMIN_INVOICE">
7065                                         <context link="invoice" field="receiver"/>
7066                                 </delete>
7067             </actions>
7068         </permacrud>
7069         </class>
7070
7071         <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">
7072                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7073                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7074                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7075                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7076                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7077                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7078                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7079                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7080                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7081                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7082                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7083                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7084                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7085                 </fields>
7086                 <links>
7087                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7088                 </links>
7089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7090             <actions>
7091                 <create permission="ADMIN_PROVIDER">
7092                     <context link="provider" field="owner"/>
7093                 </create>
7094                 <retrieve permission="ADMIN_PROVIDER">
7095                     <context link="provider" field="owner"/>
7096                 </retrieve>
7097                 <update permission="ADMIN_PROVIDER">
7098                     <context link="provider" field="owner"/>
7099                 </update>
7100                 <delete permission="ADMIN_PROVIDER">
7101                     <context link="provider" field="owner"/>
7102                 </delete>
7103             </actions>
7104         </permacrud>
7105         </class>
7106
7107         <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">
7108                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7109                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7110                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7111                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7112                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7113                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7114                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7115         </fields>
7116                 <links>
7117                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7118                 </links>
7119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7120             <actions>
7121                 <create permission="ADMIN_PROVIDER">
7122                     <context link="provider" field="owner"/>
7123                 </create>
7124                 <retrieve permission="ADMIN_PROVIDER">
7125                     <context link="provider" field="owner"/>
7126                 </retrieve>
7127                 <update permission="ADMIN_PROVIDER">
7128                     <context link="provider" field="owner"/>
7129                 </update>
7130                 <delete permission="ADMIN_PROVIDER">
7131                     <context link="provider" field="owner"/>
7132                 </delete>
7133             </actions>
7134         </permacrud>
7135     </class>
7136         <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">
7137                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7138                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7139                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7140                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7141                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7142                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7143                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7144                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7145                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7146                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7147                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7148                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7149                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7150                 </fields>
7151                 <links>
7152                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7153                 </links>
7154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155             <actions>
7156                 <create permission="ADMIN_PROVIDER">
7157                     <context link="contact" jump='provider' field="owner"/>
7158                 </create>
7159                 <retrieve permission="ADMIN_PROVIDER">
7160                     <context link="contact" jump='provider' field="owner"/>
7161                 </retrieve>
7162                 <update permission="ADMIN_PROVIDER">
7163                     <context link="contact" jump='provider' field="owner"/>
7164                 </update>
7165                 <delete permission="ADMIN_PROVIDER">
7166                     <context link="contact" jump='provider' field="owner"/>
7167                 </delete>
7168             </actions>
7169         </permacrud>
7170         </class>
7171
7172         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7173                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7174                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7175                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7176                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7177                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7178                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7179                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7180                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7181                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7182                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7183                 </fields>
7184                 <links>
7185                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7186                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7187                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7188                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7189                 </links>
7190         </class>
7191
7192         <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">
7193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7194                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7195                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7196                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7197                 </fields>
7198                 <links>
7199             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7200                 </links>
7201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7202                         <actions>
7203                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7204                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7205                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7206                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7207                         </actions>
7208                 </permacrud>
7209         </class>
7210
7211         <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">
7212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7213                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7214                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7215                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7216                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7217                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7218                 </fields>
7219                 <links>
7220                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7221                 </links>
7222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7223                         <actions>
7224                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7225                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7226                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7227                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7228                         </actions>
7229                 </permacrud>
7230         </class>
7231
7232         <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">
7233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7234                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7235                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7236                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7237                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7238                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7239                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7240                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7241                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7242                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7243                 </fields>
7244                 <links>
7245                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7246                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7247             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7248             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7249                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7250                 </links>
7251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7252             <actions>
7253                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7254                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7255                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7256                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7257             </actions>
7258         </permacrud>
7259         </class>
7260
7261         <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">
7262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7263                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7264                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7265                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7266                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7267                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7268                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7269                 </fields>
7270                 <links>
7271                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7272                 </links>
7273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7274                         <actions>
7275                                 <create permission="ADMIN_FUNDING_SOURCE">
7276                     <context link="funding_source" field="owner"/>
7277                 </create>
7278                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7279                     <context link="funding_source" field="owner"/>
7280                 </retrieve>
7281                                 <update permission="ADMIN_FUNDING_SOURCE">
7282                     <context link="funding_source" field="owner"/>
7283                 </update>
7284                                 <delete permission="ADMIN_FUNDING_SOURCE">
7285                     <context link="funding_source" field="owner"/>
7286                 </delete>
7287                         </actions>
7288                 </permacrud>
7289         </class>
7290
7291         <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">
7292                 <fields oils_persist:primary="id">
7293                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7294                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7295                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7296                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7297                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7298                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7299                 </fields>
7300                 <links>
7301                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7302                 </links>
7303         </class>
7304
7305         <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">
7306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7307                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7308                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7309                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7310                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7311                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7312                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7313                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7314                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7315                 </fields>
7316                 <links>
7317                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7318                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7319                 </links>
7320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7321                         <actions>
7322                                 <create permission="ADMIN_ACQ_FUND">
7323                     <context link="fund" field="org"/>
7324                 </create>
7325                                 <retrieve permission="ADMIN_ACQ_FUND">
7326                     <context link="fund" field="org"/>
7327                 </retrieve>
7328                                 <update permission="ADMIN_ACQ_FUND">
7329                     <context link="fund" field="org"/>
7330                 </update>
7331                                 <delete permission="ADMIN_ACQ_FUND">
7332                     <context link="fund" field="org"/>
7333                 </delete>
7334                         </actions>
7335                 </permacrud>
7336         </class>
7337
7338         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7339                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7340                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7341                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7342                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7343                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7344                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7345                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7346                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7347                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7348                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7349                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7350                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7351                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7352                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7353                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7354                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7355                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7356                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7358                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7359                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7360                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7361                 </fields>
7362                 <links>
7363                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7364                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7365             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7366             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7367             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7368             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7369             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7370             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7371             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7372             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7373             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7374                 </links>
7375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7376             <actions>
7377                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7378                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7379                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7380                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7381             </actions>
7382         </permacrud>
7383         </class>
7384
7385         <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">
7386                 <fields oils_persist:primary="fund">
7387                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7388                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7389                 </fields>
7390                 <links>
7391                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7392                 </links>
7393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394             <actions>
7395                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7396                                         <context link="fund" field="org" />
7397                 </retrieve>
7398             </actions>
7399         </permacrud>
7400         </class>
7401
7402         <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">
7403                 <fields oils_persist:primary="fund">
7404                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7405                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7406                 </fields>
7407                 <links>
7408                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7409                 </links>
7410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7411             <actions>
7412                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7413                                         <context link="fund" field="org" />
7414                 </retrieve>
7415             </actions>
7416         </permacrud>
7417         </class>
7418
7419         <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">
7420                 <fields oils_persist:primary="fund">
7421                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7422                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7423                 </fields>
7424                 <links>
7425                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7426                 </links>
7427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7428             <actions>
7429                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7430                                         <context link="fund" field="org" />
7431                 </retrieve>
7432             </actions>
7433         </permacrud>
7434         </class>
7435
7436         <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">
7437                 <fields oils_persist:primary="fund">
7438                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7439                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7440                 </fields>
7441                 <links>
7442                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7443                 </links>
7444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7445             <actions>
7446                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7447                                         <context link="fund" field="org" />
7448                 </retrieve>
7449             </actions>
7450         </permacrud>
7451         </class>
7452
7453         <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">
7454                 <fields oils_persist:primary="fund">
7455                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7456                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7457                 </fields>
7458                 <links>
7459                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7460                 </links>
7461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7462             <actions>
7463                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7464                                         <context link="fund" field="org" />
7465                 </retrieve>
7466             </actions>
7467         </permacrud>
7468         </class>
7469
7470    <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">
7471         <fields oils_persist:primary="fund">
7472             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7473             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7474         </fields>
7475         <links>
7476             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7477         </links>
7478     </class>
7479
7480    <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">
7481         <fields oils_persist:primary="fund">
7482             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7483             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7484         </fields>
7485         <links>
7486             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7487         </links>
7488     </class>
7489
7490    <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">
7491         <fields oils_persist:primary="fund">
7492             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7493             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7494         </fields>
7495         <links>
7496             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7497         </links>
7498     </class>
7499
7500    <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">
7501         <fields oils_persist:primary="fund">
7502             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7503             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7504         </fields>
7505         <links>
7506             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7507         </links>
7508     </class>
7509
7510    <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">
7511         <fields oils_persist:primary="fund">
7512             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7513             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7514         </fields>
7515         <links>
7516             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7517         </links>
7518     </class>
7519
7520         <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">
7521                 <fields oils_persist:primary="funding_source">
7522                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7523                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7524                 </fields>
7525                 <links>
7526                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7527                 </links>
7528         </class>
7529
7530         <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">
7531                 <fields oils_persist:primary="funding_source">
7532                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7533                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7534                 </fields>
7535                 <links>
7536                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7537                 </links>
7538         </class>
7539
7540         <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">
7541                 <fields oils_persist:primary="funding_source">
7542                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7543                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7544                 </fields>
7545                 <links>
7546                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7547                 </links>
7548         </class>
7549
7550         <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">
7551                 <fields oils_persist:primary="fund">
7552                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7553                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7554                 </fields>
7555                 <links>
7556                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7557                 </links>
7558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7559             <actions>
7560                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7561                                         <context link="fund" field="org" />
7562                 </retrieve>
7563             </actions>
7564         </permacrud>
7565     </class>
7566     <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">
7567         <oils_persist:source_definition><![CDATA[
7568             SELECT
7569                 acqf.*,
7570                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7571                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7572                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7573                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7574             FROM
7575                 acq.fund acqf
7576                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7577                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7578                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7579                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7580         ]]></oils_persist:source_definition>
7581         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7582             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7583             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7584             <field reporter:label="Name" name="name" reporter:datatype="text" />
7585             <field reporter:label="Year" name="year" reporter:datatype="int" />
7586             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7587             <field reporter:label="Code" name="code" reporter:datatype="text" />
7588             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7589             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7590             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7591             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7592             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7593
7594             <!-- non fund-native fields -->
7595             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7596             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7597             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7598             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7599         </fields>
7600         <links>
7601             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7602             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7603             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7604         </links>
7605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7606             <actions>
7607                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7608             </actions>
7609         </permacrud>
7610         </class>
7611         <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">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7613                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7614                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7615                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7616                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7617                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7618                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7619                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7620                 </fields>
7621                 <links>
7622                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7623                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7624                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7625                 </links>
7626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7627                         <actions>
7628                                 <create permission="ADMIN_ACQ_FUND">
7629                     <context link="fund" field="org"/>
7630                 </create>
7631                                 <retrieve permission="ADMIN_ACQ_FUND">
7632                     <context link="fund" field="org"/>
7633                 </retrieve>
7634                                 <update permission="ADMIN_ACQ_FUND">
7635                     <context link="fund" field="org"/>
7636                 </update>
7637                                 <delete permission="ADMIN_ACQ_FUND">
7638                     <context link="fund" field="org"/>
7639                 </delete>
7640                         </actions>
7641                 </permacrud>
7642         </class>
7643
7644     <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">
7645         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7646             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7647             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7648             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7649             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7650             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7651             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7652             <field reporter:label="Note" name="note" reporter:datatype="text" />
7653             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7654         </fields>
7655         <links>
7656             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7657             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7658             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7659         </links>
7660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7661                         <actions>
7662                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7663                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7664                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7665                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7666                         </actions>
7667                 </permacrud>
7668     </class>
7669
7670         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7671                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7672                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7673                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7674                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7675                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7676                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7677                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7678                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7679                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7680                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7681                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7682                 </fields>
7683                 <links>
7684                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7685                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7686                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7687                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7688                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7689                 </links>
7690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7691                         <actions>
7692                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7693                         </actions>
7694                 </permacrud>
7695         </class>
7696
7697         <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">
7698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7699                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7700                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7701                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7702                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7703                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7704                 </fields>
7705                 <links>
7706                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7707                 </links>
7708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7709                         <actions>
7710                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7711                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7712                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7713                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7714                         </actions>
7715                 </permacrud>
7716         </class>
7717
7718         <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">
7719                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7720                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7721                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7722                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7723                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7724                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7725                         <field reporter:label="State" name="state" reporter:datatype="text" />
7726                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7727                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7728                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7729                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7730                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7731                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7732                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7733                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7734                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7735                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7736                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7737                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7738                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7739                 </fields>
7740                 <links>
7741                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7742                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7743                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7744                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7745                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7746                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7747                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7748                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7749                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7750                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7751                 </links>
7752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7753                         <actions>
7754                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7755                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7756                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7757                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7758                         </actions>
7759                 </permacrud>
7760         </class>
7761
7762         <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">
7763                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7764                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7765                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7766                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7767                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7768                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7769                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7770                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7771                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7772                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7773                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7774                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7775                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7776                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7777                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7778                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7779                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7780                 </fields>
7781                 <links>
7782                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7783                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7786                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7787                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7788                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7789                 </links>
7790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7791             <actions>
7792                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7793             </actions>
7794                 </permacrud>
7795         </class>
7796
7797         <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">
7798                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7799                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7800                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7801                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7802                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7803                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7804                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7805                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7806                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7807                 </fields>
7808                 <links>
7809                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7810                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7811                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7812                 </links>
7813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7814             <actions>
7815                 <create permission="CREATE_PURCHASE_ORDER">
7816                     <context link="purchase_order" field="ordering_agency"/>
7817                 </create>
7818                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7819                     <context link="purchase_order" field="ordering_agency"/>
7820                 </retrieve>
7821                 <update permission="CREATE_PURCHASE_ORDER">
7822                     <context link="purchase_order" field="ordering_agency"/>
7823                 </update>
7824                 <delete permission="CREATE_PURCHASE_ORDER">
7825                     <context link="purchase_order" field="ordering_agency"/>
7826                 </delete>
7827             </actions>
7828                 </permacrud>
7829         </class>
7830
7831         <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">
7832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7833                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7834                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7835                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7836                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7837                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7838                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7839                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7840                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7841                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7842                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7843                 </fields>
7844                 <links>
7845                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7846                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7847                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7848                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7849                 </links>
7850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7851             <actions>
7852                 <create permission="CREATE_PURCHASE_ORDER">
7853                     <context link="purchase_order" field="ordering_agency"/>
7854                 </create>
7855                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7856                     <context link="purchase_order" field="ordering_agency"/>
7857                 </retrieve>
7858                 <update permission="CREATE_PURCHASE_ORDER">
7859                     <context link="purchase_order" field="ordering_agency"/>
7860                 </update>
7861                 <delete permission="CREATE_PURCHASE_ORDER">
7862                     <context link="purchase_order" field="ordering_agency"/>
7863                 </delete>
7864             </actions>
7865                 </permacrud>
7866         </class>
7867
7868         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7869                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7870                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7871                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7872                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7873                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7874                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7875                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7876                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7877                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7878                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7879                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7880                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7881                         <field reporter:label="State" name="state" reporter:datatype="text" />
7882                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7883                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7884                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7885                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7886                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7887                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7888                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7889                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7890                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7891                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7892                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7893                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7894                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7895                 </fields>
7896                 <links>
7897                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7898                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7899                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7900                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7901                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7902                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7903                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7904                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7905                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7906                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7907                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7908                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7909                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7910                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7911                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7912                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7913                 </links>
7914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7915                         <actions>
7916                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7917                                         <context link="purchase_order" field="ordering_agency"/>
7918                                         <context link="picklist" field="org_unit"/>
7919                                 </retrieve>
7920                         </actions>
7921                 </permacrud>
7922         </class>
7923
7924         <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">
7925                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7926                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7927                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7928                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7929                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7930                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7931                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7932                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7933                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7934                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7935                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7936                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7937                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7938                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7939                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7940                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7941                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7942                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7943                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7944                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7945                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7946                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7947                 </fields>
7948                 <links>
7949                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7950                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7951                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7952                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7953                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7954                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7955                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7956                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7957                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7958                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7959                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7960                 </links>
7961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7962                         <actions>
7963                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7964                                         <context link="purchase_order" field="ordering_agency"/>
7965                                         <context link="picklist" field="org_unit"/>
7966                                 </retrieve>
7967                         </actions>
7968                 </permacrud>
7969         </class>
7970
7971         <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">
7972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7973                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7974                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7975                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7976                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7977                 </fields>
7978                 <links>
7979                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982                         <actions>
7983                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7984                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7985                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7986                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7987                         </actions>
7988                 </permacrud>
7989         </class>
7990
7991         <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">
7992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7993                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7994                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7995                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7996                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7997                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7998                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7999                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8000                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8001                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8002                 </fields>
8003                 <links>
8004                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8005                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8006                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8007                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8008                 </links>
8009         </class>
8010
8011         <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">
8012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8013                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8014                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8015                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8016                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8017                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8018                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8019                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8020                 </fields>
8021                 <links>
8022                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8023                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8024                 </links>
8025         </class>
8026
8027         <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">
8028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8029                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8030                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8031                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8032                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8033                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8034                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8035                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8036                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8037                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8038                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8039                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8040                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8041                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8042                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8043                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8044                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8045                 </fields>
8046                 <links>
8047                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8048                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8049                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8050                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8051                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8052                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8053                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8054                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8055                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8056                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8057                 </links>
8058         </class>
8059
8060         <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">
8061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8062                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8063                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8064                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8065                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8066                 </fields>
8067                 <links/>
8068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8069                         <actions>
8070                                 <retrieve />
8071                         </actions>
8072                 </permacrud>
8073         </class>
8074
8075         <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">
8076                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8077                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8078                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8079                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8080                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8081                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8082             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8083                 </fields>
8084                 <links/>
8085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8086             <actions>
8087                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8088                 <retrieve />
8089                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8090                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8091             </actions>
8092         </permacrud>
8093         </class>
8094
8095         <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">
8096                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8097                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8098                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8099                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8100                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8101                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8102                 </fields>
8103                 <links/>
8104         </class>
8105         <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">
8106                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8107                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8108                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8109                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8110                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8111                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8112                 </fields>
8113                 <links>
8114                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8115                 </links>
8116         </class>
8117
8118         <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">
8119             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8120                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8121                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8122                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8123                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8124                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8125                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8126         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8127
8128             </fields>
8129             <links>
8130                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8131             </links>
8132             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8133                 <actions>
8134                     <create permission="ADMIN_PROVIDER">
8135                         <context link="provider" field="owner"/>
8136                     </create>
8137                     <retrieve permission="ADMIN_PROVIDER">
8138                         <context link="provider" field="owner"/>
8139                     </retrieve>
8140                     <update permission="ADMIN_PROVIDER">
8141                         <context link="provider" field="owner"/>
8142                     </update>
8143                     <delete permission="ADMIN_PROVIDER">
8144                         <context link="provider" field="owner"/>
8145                     </delete>
8146                 </actions>
8147             </permacrud>
8148         </class>
8149         
8150         <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">
8151             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8152                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8153                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8154                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8155                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8156             </fields>
8157             <links>
8158                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8159             </links>
8160             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161                 <actions>
8162                     <create permission="ADMIN_PROVIDER">
8163                         <context link="provider" field="owner"/>
8164                     </create>
8165                     <retrieve permission="ADMIN_PROVIDER">
8166                         <context link="provider" field="owner"/>
8167                     </retrieve>
8168                     <update permission="ADMIN_PROVIDER">
8169                         <context link="provider" field="owner"/>
8170                     </update>
8171                     <delete permission="ADMIN_PROVIDER">
8172                         <context link="provider" field="owner"/>
8173                     </delete>
8174                 </actions>
8175             </permacrud>
8176         </class>
8177         
8178         <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">
8179             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8180                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8181                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8182                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8183                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8184                 </fields>
8185                 <links/>
8186         </class>
8187
8188         <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">
8189                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8190                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8191                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8192                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8193                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8194                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8195                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8196                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8197                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8198                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8199                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8200                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8201                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8202                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8203                 </fields>
8204                 <links>
8205                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8206                         <link field="owner" 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_PROVIDER">
8211                     <context link="provider" field="owner"/>
8212                 </create>
8213                 <retrieve permission="ADMIN_PROVIDER">
8214                     <context link="provider" field="owner"/>
8215                 </retrieve>
8216                 <update permission="ADMIN_PROVIDER">
8217                     <context link="provider" field="owner"/>
8218                 </update>
8219                 <delete permission="ADMIN_PROVIDER">
8220                     <context link="provider" field="owner"/>
8221                 </delete>
8222             </actions>
8223         </permacrud>
8224         </class>
8225
8226         <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">
8227                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8228                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8229                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8230                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8231                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8232                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8233                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8234                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8235                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8236                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8237                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8238                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8239                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8240                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8241                 </fields>
8242                 <links>
8243                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8244                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8245                 </links>
8246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8247             <actions>
8248                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8249                     <context link="account" jump="provider" field="owner"/>
8250                 </retrieve>
8251                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8252                     <context link="account" jump="provider" field="owner"/>
8253                 </update>
8254                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8255                     <context link="account" jump="provider" field="owner"/>
8256                 </delete>
8257             </actions>
8258         </permacrud>
8259         </class>
8260
8261
8262         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8263                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8264                         <field name="id" reporter:datatype="id" />
8265                         <field name="parent" reporter:datatype="link"/>
8266                         <field name="owner" reporter:datatype="link"/>
8267                         <field name="create_time" reporter:datatype="timestamp"/>
8268                         <field name="name" reporter:datatype="text"/>
8269                         <field name="shared" reporter:datatype="bool"/>
8270                         <field name="share_with" reporter:datatype="link"/>
8271                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8272                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8273                 </fields>
8274                 <links>
8275                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8276                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8277                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8278                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8279                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8280                 </links>
8281         </class>
8282         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8283                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8284                         <field name="id" reporter:datatype="id" />
8285                         <field name="parent" reporter:datatype="link"/>
8286                         <field name="owner" reporter:datatype="link"/>
8287                         <field name="create_time" reporter:datatype="timestamp"/>
8288                         <field name="name" reporter:datatype="text"/>
8289                         <field name="shared" reporter:datatype="bool"/>
8290                         <field name="share_with" reporter:datatype="link"/>
8291                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8292                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8293                 </fields>
8294                 <links>
8295                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8296                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8297                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8298                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8299                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8300                 </links>
8301         </class>
8302         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8303                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8304                         <field name="id" reporter:datatype="id" />
8305                         <field name="parent" reporter:datatype="link"/>
8306                         <field name="owner" reporter:datatype="link"/>
8307                         <field name="create_time" reporter:datatype="timestamp"/>
8308                         <field name="name" reporter:datatype="text"/>
8309                         <field name="shared" reporter:datatype="bool"/>
8310                         <field name="share_with" reporter:datatype="link"/>
8311                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8312                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8313                 </fields>
8314                 <links>
8315                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8316                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8317                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8318                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8319                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8320                 </links>
8321         </class>
8322         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8323                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8324                         <field name="id" reporter:datatype="id" />
8325                         <field name="owner" reporter:datatype="link"/>
8326                         <field name="create_time" reporter:datatype="timestamp"/>
8327                         <field name="name" reporter:datatype="text"/>
8328                         <field name="data" reporter:datatype="text"/>
8329                         <field name="folder" reporter:datatype="link"/>
8330                         <field name="description" reporter:datatype="text"/>
8331                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8332                 </fields>
8333                 <links>
8334                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8335                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8336                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8337                 </links>
8338         </class>
8339         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8340                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8341                         <field name="id" reporter:datatype="id" />
8342                         <field name="owner" reporter:datatype="link"/>
8343                         <field name="create_time" reporter:datatype="timestamp"/>
8344                         <field name="template" reporter:datatype="link"/>
8345                         <field name="data" reporter:datatype="text"/>
8346                         <field name="folder" reporter:datatype="link"/>
8347                         <field name="recur" reporter:datatype="bool"/>
8348                         <field name="recurrence" reporter:datatype="interval"/>
8349                         <field name="name" reporter:datatype="text"/>
8350                         <field name="description" reporter:datatype="text"/>
8351                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8352                 </fields>
8353                 <links>
8354                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8355                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8356                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8357                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8358                 </links>
8359         </class>
8360         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8361                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8362                         <field name="id" reporter:datatype="id" />
8363                         <field name="runner" reporter:datatype="link"/>
8364                         <field name="start_time" reporter:datatype="timestamp"/>
8365                         <field name="complete_time" reporter:datatype="timestamp"/>
8366                         <field name="run_time" reporter:datatype="timestamp"/>
8367                         <field name="email" reporter:datatype="text"/>
8368                         <field name="excel_format" reporter:datatype="bool"/>
8369                         <field name="csv_format" reporter:datatype="bool"/>
8370                         <field name="html_format" reporter:datatype="bool"/>
8371                         <field name="error_code" reporter:datatype="int"/>
8372                         <field name="error_text" reporter:datatype="text"/>
8373                         <field name="report" reporter:datatype="link"/>
8374                         <field name="folder" reporter:datatype="link"/>
8375                         <field name="chart_pie" reporter:datatype="bool"/>
8376                         <field name="chart_bar" reporter:datatype="bool"/>
8377                         <field name="chart_line" reporter:datatype="bool"/>
8378                 </fields>
8379                 <links>
8380                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8381                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8382                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8383                 </links>
8384         </class>
8385         <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">
8386                 <fields oils_persist:primary="id">
8387                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8388                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8389                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8390                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8391                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8392                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8393                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8394                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8395                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8396                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8397                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8398                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8399                 </fields>
8400                 <links>
8401                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8402                 </links>
8403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8404                         <actions>
8405                                 <retrieve />
8406                         </actions>
8407                 </permacrud>
8408         </class>
8409         <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">
8410                 <fields oils_persist:primary="id">
8411                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8412                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8413                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8414                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8415                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8416                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8417                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8418                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8419                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8420                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8421                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8422                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8423                 </fields>
8424                 <links>
8425                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8426                 </links>
8427         </class>
8428         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8429                 <fields oils_persist:primary="id">
8430                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8431                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8432                         <field reporter:label="Fingerprint" name="fingerprint" />
8433                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8434                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8435                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8436                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8437                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8438                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8439                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8440                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8441                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8442                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8443                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8444                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8445                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8446                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8447                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8448                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8449                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8450                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8451                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8452                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8453                 </fields>
8454                 <links>
8455                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8456                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8457                 </links>
8458         </class>
8459         <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">
8460                 <fields oils_persist:primary="id">
8461                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8462                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8463                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8464                 </fields>
8465                 <links>
8466                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8467                 </links>
8468         </class>
8469         <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">
8470                 <fields oils_persist:primary="id">
8471                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8472                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8473                 </fields>
8474                 <links>
8475                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8476                 </links>
8477         </class>
8478         <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">
8479                 <fields oils_persist:primary="id">
8480                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8481                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8482                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8483                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8484                 </fields>
8485                 <links>
8486                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8487                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8488                 </links>
8489         </class>
8490         <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">
8491                 <fields oils_persist:primary="xact">
8492                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8493                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8494                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8495                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8496                 </fields>
8497                 <links>
8498                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8499                 </links>
8500         </class>
8501         <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">
8502                 <fields oils_persist:primary="xact">
8503                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8504                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8505                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8506                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8507                 </fields>
8508                 <links>
8509                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8510                 </links>
8511         </class>
8512         <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)">
8513                 <fields oils_persist:primary="id">
8514                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8515                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8516                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8517                 </fields>
8518                 <links>
8519                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8520                 </links>
8521         </class>
8522         <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">
8523                 <fields oils_persist:primary="id">
8524                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8525                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8526                 </fields>
8527                 <links>
8528                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8529                 </links>
8530         </class>
8531         <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">
8532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8533                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8534                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8535                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8536                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8537                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8538                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8539                 </fields>
8540                 <links>
8541                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8542                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8543                 </links>
8544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8545                         <actions>
8546                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8547                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8548                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8549                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8550                         </actions>
8551                 </permacrud>
8552         </class>
8553         <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">
8554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8555                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8556                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8557                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8558                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8559                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8560                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8561                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8562                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8563                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8564                 </fields>
8565                 <links>
8566                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8567                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8568                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8569                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8570                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8571                 </links>
8572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8573                         <actions>
8574                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8575                                         <context link="formula" field="owner"/>
8576                                 </create>
8577                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8578                                         <context link="formula" field="owner"/>
8579                                 </retrieve>
8580                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8581                                         <context link="formula" field="owner"/>
8582                                 </update>
8583                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8584                                         <context link="formula" field="owner"/>
8585                                 </delete>
8586                         </actions>
8587                 </permacrud>
8588         </class>
8589
8590         <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">
8591                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8592                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8593                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8594                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8595                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8596                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8597                 </fields>
8598                 <links>
8599                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8600                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8601                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8602                 </links>
8603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8604                         <actions>
8605                                 <create permission="CREATE_PURCHASE_ORDER">
8606                                         <context link="formula" field="owner"/>
8607                 </create>
8608                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8609                                         <context link="formula" field="owner"/>
8610                 </retrieve>
8611                                 <update permission="CREATE_PURCHASE_ORDER">
8612                                         <context link="formula" field="owner"/>
8613                 </update>
8614                                 <delete permission="CREATE_PURCHASE_ORDER">
8615                                         <context link="formula" field="owner"/>
8616                 </delete>
8617                         </actions>
8618                 </permacrud>
8619         </class>
8620
8621         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8622                 <fields oils_persist:primary="id">
8623                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8624                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8625                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8626                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8627                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8628                 </fields>
8629                 <links>
8630                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8631                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8632                 </links>
8633         </class>
8634
8635         <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">
8636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8637                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8638                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8639                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8640                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8641                 </fields>
8642                 <links>
8643                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8644                 </links>
8645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8646                         <actions>
8647                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8648                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8649                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8650                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8651                         </actions>
8652                 </permacrud>
8653         </class>
8654
8655         <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">
8656                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8657                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8658                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8660                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8661                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8662                 </fields>
8663                 <links>
8664                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8665                 </links>
8666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8667                         <actions>
8668                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8669                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8670                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8671                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8672                         </actions>
8673                 </permacrud>
8674         </class>
8675
8676         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8677                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8678                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8679                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8680                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8681                 </fields>
8682                 <links>
8683                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8684                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8685                 </links>
8686         </class>
8687
8688         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8689                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8690                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8691                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8692                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8693                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8694                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8695                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8696                 </fields>
8697                 <links>
8698                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8699                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8700                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8701                 </links>
8702         </class>
8703
8704         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8705                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8706                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8707                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8708                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8709                 </fields>
8710                 <links>
8711                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8712                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8713                 </links>
8714         </class>
8715
8716         <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">
8717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8718                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8719                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8720                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8721                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8722                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8723                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8724                 </fields>
8725                 <links>
8726                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8727                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8728                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8729                 </links>
8730         </class>
8731
8732         <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">
8733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8734                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8735                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8736                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8737                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8738                 </fields>
8739                 <links>
8740                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8741                 </links>
8742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8743             <actions>
8744                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8745                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8746                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8747                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8748             </actions>
8749                 </permacrud>
8750         </class>
8751
8752         <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">
8753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8754                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8755                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8756                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8757                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8758                 </fields>
8759                 <links>
8760                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8761                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8762                 </links>
8763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8764                         <actions>
8765                                 <create permission="ADMIN_CLAIM_POLICY">
8766                                         <context link="claim_policy" field="org_unit"/>
8767                 </create>
8768                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8769                                         <context link="claim_policy" field="org_unit"/>
8770                 </retrieve>
8771                                 <update permission="ADMIN_CLAIM_POLICY">
8772                                         <context link="claim_policy" field="org_unit"/>
8773                 </update>
8774                                 <delete permission="ADMIN_CLAIM_POLICY">
8775                                         <context link="claim_policy" field="org_unit"/>
8776                 </delete>
8777                         </actions>
8778                 </permacrud>
8779         </class>
8780
8781     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8782         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8783             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8784             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8785             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8786             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8787             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8788             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8789             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8790             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8791             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8792             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8793             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8794             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8795             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8796             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8797             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8798         </fields>
8799     </class>
8800
8801     <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">
8802         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8803             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8804             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8805             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8806             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8807             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8808         </fields>
8809     </class>
8810
8811     <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">
8812         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8813             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8814             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8815             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8816             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8817             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8818             <field reporter:label="City" name="city" reporter:datatype="text"/>
8819             <field reporter:label="State" name="state" reporter:datatype="text"/>
8820             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8821             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8822             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8823         </fields>
8824     </class>
8825
8826     <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">
8827         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8828             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8829             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8830             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8831             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8832             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8833             <field reporter:label="City" name="city" reporter:datatype="text"/>
8834             <field reporter:label="State" name="state" reporter:datatype="text"/>
8835             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8836             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8837             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8838         </fields>
8839     </class>
8840
8841     <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">
8842         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8843             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8844             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8845             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8846             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8847             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8848             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8849         </fields>
8850     </class>
8851
8852         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8853                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8854                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8855                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8856                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8857                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8858                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8859                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8860                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8861                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8862                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8863                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8864                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8865                 </fields>
8866                 <links>
8867                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8868                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8869                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8870                 </links>
8871         </class>
8872
8873         <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">
8874                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8875                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8876                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8877                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8878                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8879                 </fields>
8880                 <links>
8881                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8882                 </links>
8883         </class>
8884
8885     <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">
8886         <fields>
8887             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8888             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8889             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8890         </fields>
8891                 <links>
8892                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8893                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8894                 </links>
8895     </class>
8896
8897     <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">
8898         <fields>
8899             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8900             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8901         </fields>
8902                 <links>
8903                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8904                 </links>
8905     </class>
8906
8907     <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">
8908         <fields>
8909             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8910             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8911             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8912         </fields>
8913                 <links>
8914                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8915                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8916                 </links>
8917     </class>
8918
8919     <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">
8920         <fields>
8921             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8922             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8923         </fields>
8924                 <links>
8925                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8926                 </links>
8927     </class>
8928
8929     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8930                 <oils_persist:source_definition>
8931
8932             SELECT  DISTINCT l.*
8933               FROM  action.unfulfilled_hold_loops l
8934                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8935               WHERE l.count = m.max
8936
8937                 </oils_persist:source_definition>
8938         <fields>
8939             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8940             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8941             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8942         </fields>
8943                 <links>
8944                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8945                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8946                 </links>
8947     </class>
8948
8949         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8950                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8951                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8952                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8953                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8954                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8955                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8956                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8957                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8958                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8959                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8960                 </fields>
8961                 <links>
8962                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8963                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8964                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8965                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8966                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8967                 </links>
8968         </class>
8969
8970         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8971                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8972                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8973                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8974                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8975                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8976                 </fields>
8977                 <links>
8978                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8979                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8980                 </links>
8981         </class>
8982
8983         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8984                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8985                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8986                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8987                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8988                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8989                 </fields>
8990                 <links>
8991                 </links>
8992         </class>
8993
8994         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8995                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8996                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8997                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8998                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8999                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9000                 </fields>
9001                 <links>
9002                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9003                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9004                 </links>
9005         </class>
9006         
9007         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9008                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9009                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9010                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9011                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9012                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9013                 </fields>
9014                 <links>
9015                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9016                 </links>
9017         </class>
9018         
9019         <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">
9020                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9021                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9022                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9023                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9024                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9025                 </fields>
9026                 <links>
9027                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9028                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9029                 </links>
9030         </class>
9031
9032         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9033                 <fields oils_persist:primary="name">
9034                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9035                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9036                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9037                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9038                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9039                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9040                 </fields>
9041                 <links>
9042                 </links>
9043         </class>
9044
9045         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9046                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9047                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9048                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9049                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9050                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9051                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9052                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9053                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9054                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9055                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9056                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9057                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9058                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9059                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9060                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9061                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9062                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9063                 </fields>
9064                 <links>
9065                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9066                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9067                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9068                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9069                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9070                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9071                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9072                 </links>
9073         </class>
9074
9075         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9076                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9077                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9078                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9079                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9080                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9081                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9082                 </fields>
9083                 <links>
9084                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9085                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9086                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9087                 </links>
9088         </class>
9089
9090         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9091                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9092                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9093                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9094                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9095                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9096                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9097                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9098                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9099                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9100                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9101                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9102                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9103                 </fields>
9104                 <links>
9105                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9106                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9107                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9108                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9109                 </links>
9110         </class>
9111
9112         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9113                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9114                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9115                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9116                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9117                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9118                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9119                 </fields>
9120                 <links>
9121                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9122                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9123                 </links>
9124         </class>
9125
9126         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9127                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9128                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9129                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9130                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9131                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9132                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9133                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9134                 </fields>
9135                 <links>
9136                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9137                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9138                 </links>
9139         </class>
9140
9141         <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">
9142                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9143                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9144                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9146                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9147                 </fields>
9148                 <links>
9149                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9150                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9151                 </links>
9152         </class>
9153
9154         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9155                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9156                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9157                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9158                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9159                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9160                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9161                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9162                 </fields>
9163                 <links>
9164                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9165                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9166                 </links>
9167         </class>
9168
9169         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9170                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9171                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9172                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9173                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9174                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9175                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9176                 </fields>
9177                 <links>
9178                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9179                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9180                 </links>
9181         </class>
9182
9183         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9184                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9185                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9186                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9187                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9188                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9189                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9190                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9191                 </fields>
9192                 <links>
9193                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9194                 </links>
9195         </class>
9196
9197         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9198                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9199                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9200                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9201                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9202                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9203                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9204                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9205                 </fields>
9206                 <links>
9207                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9208                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9209                 </links>
9210         </class>
9211
9212         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9213                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9214                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9215                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9216                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9217                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9218                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9219                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9220                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9221                 </fields>
9222                 <links>
9223                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9224                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9225                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9226                 </links>
9227         </class>
9228
9229         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9230                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9231                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9232                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9233                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9234                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9235                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9236                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9237                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9238                 </fields>
9239                 <links>
9240                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9241                 </links>
9242         </class>
9243
9244         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9245                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9246                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9247                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9248                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9249                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9250                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9251                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9252                 </fields>
9253                 <links>
9254                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9255                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9256                 </links>
9257         </class>
9258
9259         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9260                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9261                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9262                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9263                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9264                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9265                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9266                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9267                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9268                 </fields>
9269                 <links>
9270                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9271                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9272                 </links>
9273         </class>
9274
9275         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9276                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9277                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9278                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9279                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9281                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9282                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9283                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9284                 </fields>
9285                 <links>
9286                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9287                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9288                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9289                 </links>
9290         </class>
9291
9292         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9293                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9294                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9295                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9296                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9297                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9298                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9299                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9300                 </fields>
9301                 <links>
9302                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9303                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9304                 </links>
9305         </class>
9306
9307         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9308                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9309                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9310                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9311                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9312                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9313                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9314                 </fields>
9315                 <links>
9316                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9317                 </links>
9318         </class>
9319
9320         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9321                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9322                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9323                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9324                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9325                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9326                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9327                 </fields>
9328                 <links>
9329                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9330                 </links>
9331         </class>
9332
9333         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9334                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9335                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9336                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9337                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9338                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9339                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9340                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9341                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9342                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9343                 </fields>
9344                 <links>
9345                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9346                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9347                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9348                 </links>
9349         </class>
9350
9351         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9352                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9353                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9354                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9355                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9356                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9357                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9358                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9359                 </fields>
9360                 <links>
9361                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9362                 </links>
9363         </class>
9364
9365         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9366                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9367                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9368                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9369                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9370                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9371                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9372                 </fields>
9373                 <links>
9374                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9375                 </links>
9376         </class>
9377
9378         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9379                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9380                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9381                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9382                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9383                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9384                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9385                 </fields>
9386                 <links>
9387                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9388                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9389                 </links>
9390         </class>
9391
9392         <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">
9393                 <fields oils_persist:primary="id">
9394                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9395                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9396                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9397                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9398                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9399                 </fields>
9400                 <links>
9401                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9402                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9403                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9404                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9405                 </links>
9406         </class>
9407
9408         <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">
9409                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9411                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9412                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9413                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9414                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9415                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9416                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9417                 </fields>
9418                 <links/>
9419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9420                         <actions>
9421                                 <retrieve/>
9422                         </actions>
9423                 </permacrud>
9424         </class>
9425
9426         <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">
9427                 <fields oils_persist:primary="ptype_key">
9428                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9429                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9430                 </fields>
9431                 <links/>
9432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9433                         <actions>
9434                                 <retrieve/>
9435                         </actions>
9436                 </permacrud>
9437         </class>
9438
9439         <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">
9440                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9441                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9442                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9443                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9444                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9445                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9446                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9447                 </fields>
9448                 <links>
9449                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9450                 </links>
9451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9452                         <actions>
9453                                 <retrieve/>
9454                         </actions>
9455                 </permacrud>
9456         </class>
9457
9458         <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">
9459                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9460                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9461                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9462                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9463                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9464                 </fields>
9465                 <links>
9466                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9467                 </links>
9468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9469                         <actions>
9470                                 <retrieve/>
9471                         </actions>
9472                 </permacrud>
9473         </class>
9474
9475     <class
9476         id="uvs"
9477         controller="open-ils.cstore open-ils.pcrud"
9478         oils_obj:fieldmapper="url_verify::session"
9479         oils_persist:tablename="url_verify.session"
9480         reporter:label="URL Verification Session"
9481     >
9482         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9483             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9484             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9485                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9486             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9487             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9488             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9489             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9490             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9491             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9492         </fields>
9493
9494         <links>
9495             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9496             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9497             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9498             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9499             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9500         </links>
9501
9502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9503             <actions>
9504                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9505             </actions>
9506         </permacrud>
9507
9508     </class>
9509
9510     <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">
9511         <oils_persist:source_definition>
9512             SELECT
9513                 cbrebi.id AS id,  -- so we can have a pkey in our view
9514                 uvs.id AS session,
9515                 uvs.owning_lib,
9516                 cbrebi.target_biblio_record_entry
9517             FROM url_verify.session uvs
9518             JOIN container.biblio_record_entry_bucket cbreb
9519                 ON (uvs.container = cbreb.id)
9520             JOIN container.biblio_record_entry_bucket_item cbrebi
9521                 ON (cbrebi.bucket = cbreb.id)
9522         </oils_persist:source_definition>
9523         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9524             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9525             <field reporter:label="Session" name="session" reporter:datatype="link" />
9526             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9527             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9528         </fields>
9529         <links>
9530             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9531             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9532             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9533         </links>
9534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9535             <actions>
9536                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9537             </actions>
9538         </permacrud>
9539     </class>
9540
9541     <class
9542         id="uvus"
9543         controller="open-ils.cstore open-ils.pcrud"
9544         oils_obj:fieldmapper="url_verify::url_selector"
9545         oils_persist:tablename="url_verify.url_selector"
9546         reporter:label="URL Verification URL Selector"
9547     >
9548         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9549             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9550             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9551                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9552             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9553         </fields>
9554
9555         <links>
9556             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9557             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9558         </links>
9559
9560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9561             <actions>
9562                 <create permission="URL_VERIFY">
9563                     <context link="session" field="owning_lib"/>
9564                 </create>
9565                 <retrieve permission="URL_VERIFY">
9566                     <context link="session" field="owning_lib"/>
9567                 </retrieve>
9568                 <update permission="URL_VERIFY">
9569                     <context link="session" field="owning_lib"/>
9570                 </update>
9571                 <delete permission="URL_VERIFY">
9572                     <context link="session" field="owning_lib"/>
9573                 </delete>
9574             </actions>
9575         </permacrud>
9576
9577     </class>
9578
9579     <class
9580         id="uvu"
9581         controller="open-ils.cstore open-ils.pcrud"
9582         oils_obj:fieldmapper="url_verify::url"
9583         oils_persist:tablename="url_verify.url"
9584         reporter:label="URL Verification URL"
9585     >
9586         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9587             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9588                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9589                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9590                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9591                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9592             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9593             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9594             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9595             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9596             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9597             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9598             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9599             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9600             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9601             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9602             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9603             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9604             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9605         </fields>
9606
9607         <links>
9608             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9609             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9610             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9611             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9612             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9613         </links>
9614
9615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9616             <actions>
9617                 <create permission="URL_VERIFY">
9618                     <context link="session" field="owning_lib"/>
9619                 </create>
9620                 <retrieve permission="URL_VERIFY">
9621                     <context link="session" field="owning_lib"/>
9622                 </retrieve>
9623                 <update permission="URL_VERIFY">
9624                     <context link="session" field="owning_lib"/>
9625                 </update>
9626                 <delete permission="URL_VERIFY">
9627                     <context link="session" field="owning_lib"/>
9628                 </delete>
9629             </actions>
9630         </permacrud>
9631
9632     </class>
9633
9634     <class
9635         id="uvva"
9636         controller="open-ils.cstore open-ils.pcrud"
9637         oils_obj:fieldmapper="url_verify::verification_attempt"
9638         oils_persist:tablename="url_verify.verification_attempt"
9639         reporter:label="URL Verification Attempt"
9640     >
9641         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9642             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9643                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9644                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9645             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9646             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9647         </fields>
9648
9649         <links>
9650             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9651             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9652         </links>
9653
9654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9655             <actions>
9656                 <create permission="URL_VERIFY">
9657                     <context link="session" field="owning_lib"/>
9658                 </create>
9659                 <retrieve permission="URL_VERIFY">
9660                     <context link="session" field="owning_lib"/>
9661                 </retrieve>
9662                 <update permission="URL_VERIFY">
9663                     <context link="session" field="owning_lib"/>
9664                 </update>
9665                 <delete permission="URL_VERIFY">
9666                     <context link="session" field="owning_lib"/>
9667                 </delete>
9668             </actions>
9669         </permacrud>
9670
9671     </class>
9672
9673     <class
9674         id="uvuv"
9675         controller="open-ils.cstore open-ils.pcrud"
9676         oils_obj:fieldmapper="url_verify::url_verification"
9677         oils_persist:tablename="url_verify.url_verification"
9678         reporter:label="URL Verification"
9679     >
9680         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9681             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9682                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9683                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9684             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9685             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9686             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9687             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9688                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9689         </fields>
9690
9691         <links>
9692             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9693             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9694             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9695         </links>
9696
9697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9698             <actions>
9699                 <create permission="URL_VERIFY">
9700                     <context link="attempt" jump="session" field="owning_lib"/>
9701                 </create>
9702                 <retrieve permission="URL_VERIFY">
9703                     <context link="attempt" jump="session" field="owning_lib"/>
9704                 </retrieve>
9705                 <update permission="URL_VERIFY">
9706                     <context link="attempt" jump="session" field="owning_lib"/>
9707                 </update>
9708                 <delete permission="URL_VERIFY">
9709                     <context link="attempt" jump="session" field="owning_lib"/>
9710                 </delete>
9711             </actions>
9712         </permacrud>
9713
9714     </class>
9715
9716         <class
9717                 id="cfdi"
9718                 controller="open-ils.cstore open-ils.pcrud"
9719                 oils_obj:fieldmapper="config::filter_dialog_interface"
9720                 oils_persist:tablename="config.filter_dialog_interface"
9721                 reporter:label="FilterDialog Interface">
9722                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9723                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9724                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9725                 </fields>
9726                 <links>
9727                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9728                 </links>
9729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9730                         <actions>
9731                                 <retrieve />
9732                         </actions>
9733                 </permacrud>
9734         </class>
9735
9736         <class
9737                 id="cfdfs"
9738                 controller="open-ils.cstore open-ils.pcrud"
9739                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9740                 oils_persist:tablename="config.filter_dialog_filter_set"
9741                 reporter:label="FilterDialog Filter Set">
9742                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9743                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9744                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9745                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9746                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9747                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9748                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9749                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9750                 </fields>
9751                 <links>
9752                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9753                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9754                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9755                 </links>
9756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9757                         <actions>
9758                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9759                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9760                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9761                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9762                         </actions>
9763                 </permacrud>
9764
9765         </class>
9766
9767         <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">
9768                 <fields oils_persist:primary="code">
9769                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9770                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9771                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9772                 </fields>
9773                 <links/>
9774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9775                         <actions>
9776                                 <retrieve/>
9777                         </actions>
9778                 </permacrud>
9779         </class>
9780
9781         <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">
9782                 <oils_persist:source_definition>
9783
9784             SELECT  b.id,
9785                     MAX(dcp.edit_date) AS last_delete_date
9786              FROM   biblio.record_entry b
9787                     JOIN asset.call_number cn ON (cn.record = b.id)
9788                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9789              WHERE  NOT b.deleted
9790              GROUP BY b.id
9791              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9792
9793                 </oils_persist:source_definition>
9794                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9795                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9796                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9797                 </fields>
9798                 <links>
9799                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9800                 </links>
9801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9802                         <actions>
9803                                 <retrieve/>
9804                         </actions>
9805                 </permacrud>
9806         </class>
9807
9808         <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">
9809                 <oils_persist:source_definition>
9810
9811             -- -- 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.
9812             -- -- 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
9813             -- -- may not.
9814             -- SELECT
9815             --     bre.id AS "bib_id",
9816             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9817             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9818             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9819             -- FROM (
9820                 SELECT
9821                     y.bre AS "id",
9822                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9823                     y.hold_count AS "hold_count",
9824                     (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"
9825                 FROM (
9826                         SELECT
9827                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9828                             COUNT(*) AS "hold_count"
9829                         FROM action.hold_request h
9830                         WHERE
9831                             cancel_time IS NULL
9832                             AND fulfillment_time IS NULL
9833                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9834                         GROUP BY 1
9835                     )y LEFT JOIN (
9836                         SELECT 
9837                             (SELECT id
9838                                 FROM biblio.record_entry 
9839                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9840                             ) AS "bre", 
9841                             COUNT(*) AS "copy_count"
9842                         FROM asset.copy
9843                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9844                         WHERE copy.holdable 
9845                             AND NOT copy.deleted 
9846                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9847                         GROUP BY 1
9848                     )x ON x.bre = y.bre
9849                 -- )z RIGHT JOIN (
9850                 --     SELECT id
9851                 --     FROM biblio.record_entry
9852                 --     WHERE NOT deleted
9853                 -- )bre ON (z.bib_id = bre.id)
9854                 
9855
9856                 </oils_persist:source_definition>
9857                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9858                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9859                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9860                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9861                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9862                 </fields>
9863                 <links>
9864                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9865                 </links>
9866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9867                         <actions>
9868                                 <retrieve/>
9869                         </actions>
9870                 </permacrud>
9871         </class>
9872
9873         <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">
9874                 <oils_persist:source_definition>
9875             SELECT *,
9876                 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,
9877                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9878             FROM
9879                 (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
9880                     FROM
9881                         action.hold_request ahr
9882                         JOIN reporter.hold_request_record rhrr USING (id)
9883                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9884                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9885                     WHERE
9886                         ahr.cancel_time IS NULL
9887                         AND ahr.fulfillment_time IS NULL
9888                     GROUP BY bib_record, pickup_lib
9889                 )x
9890                 JOIN
9891                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9892                     FROM
9893                         action.hold_request ahr
9894                         JOIN reporter.hold_request_record rhrr USING (id)
9895                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9896                     WHERE
9897                         ahr.cancel_time IS NULL
9898                         AND ahr.fulfillment_time IS NULL
9899                     GROUP BY bib_record
9900                 )y
9901                 USING (id)
9902                 </oils_persist:source_definition>
9903                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9904                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9905                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9906                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9907                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9908                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9909                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9910                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9911                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9912                 </fields>
9913                 <links>
9914                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9915                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9916                 </links>
9917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9918                         <actions>
9919                                 <retrieve/>
9920                         </actions>
9921                 </permacrud>
9922         </class>
9923
9924         <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">
9925                 <oils_persist:source_definition>
9926             SELECT
9927                 ac.id,
9928                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9929                 MAX(actac.xact_start) AS last_circ
9930             FROM asset.copy ac
9931                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9932             GROUP BY ac.id
9933
9934             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9935             --SELECT
9936             --    ac.id,
9937             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9938             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9939             --FROM asset.copy ac
9940             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9941             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9942             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9943                 </oils_persist:source_definition>
9944                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9945                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9946                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9947                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9948                 </fields>
9949                 <links>
9950                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9951                 </links>
9952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9953                         <actions>
9954                                 <retrieve/>
9955                         </actions>
9956                 </permacrud>
9957         </class>
9958
9959         <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">
9960                 <fields oils_persist:primary="id">
9961                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
9962                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
9963                 </fields>
9964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9965                         <actions>
9966                                 <retrieve/>
9967                         </actions>
9968                 </permacrud>
9969         </class>
9970
9971         <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">
9972                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
9973                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9974                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
9975                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9976                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9977                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9978                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9979                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9980                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
9981                 </fields>
9982                 <links>
9983                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
9984                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9985                 </links>
9986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9987                         <actions>
9988                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9989                                 <retrieve/>
9990                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9991                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9992                         </actions>
9993                 </permacrud>
9994         </class>
9995
9996         <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">
9997                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
9998                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9999                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10000                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10001                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10002                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10003                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10004                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10005                 </fields>
10006                 <links>
10007                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10008                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10009                 </links>
10010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10011                         <actions>
10012                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10013                                 <retrieve/>
10014                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10015                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10016                         </actions>
10017                 </permacrud>
10018         </class>
10019
10020
10021         <!-- ********************************************************************************************************************* -->
10022         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10023         <!-- ********************************************************************************************************************* -->
10024         <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">
10025                 <fields oils_persist:primary="id">
10026                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10027                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10028                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10029                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10030                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10031                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10032                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10033                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10034                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10035                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10036                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10037                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10038                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10039                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10040                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10041                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10042                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10043                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10044                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10045                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10046                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10047                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10048                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10049                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10050                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10051                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10052                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10053                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10054                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10055                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10056                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10057                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10058                 </fields>
10059                 <links>
10060                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10061                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10062                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10063                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10064                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10065                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10066                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10067                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10068                 </links>
10069         </class>
10070
10071         <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">
10072                 <fields oils_persist:primary="id">
10073                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10074                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10075                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10076                 </fields>
10077                 <links>
10078                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10079                 </links>
10080         </class>
10081
10082         <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">
10083                 <fields oils_persist:primary="id">
10084                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10085                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10086                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10087                 </fields>
10088                 <links>
10089                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10090                 </links>
10091         </class>
10092
10093         <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">
10094                 <fields oils_persist:primary="id">
10095                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10096
10097                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10098                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10099                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10100
10101                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10102                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10103                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10104
10105                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10106                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10107
10108                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10109                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10110                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10111
10112                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10113                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10114
10115                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10116                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10117                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10118
10119                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10120                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10121                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10122
10123                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10124                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10125                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10126                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10127
10128                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10129                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10130
10131                 </fields>
10132                 <links>
10133                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10134                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10135                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10136                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10137                 </links>
10138         </class>
10139
10140         <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">
10141                 <oils_persist:source_definition>
10142
10143             SELECT
10144                 po.ordering_agency AS ordering_agency,
10145                 po.id AS purchase_order,
10146                 li.id AS lineitem,
10147                 lid.id AS lineitem_detail,
10148                 cpa.id AS claim_policy_action
10149             FROM
10150                 acq.lineitem_detail lid
10151                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10152                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10153                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10154                 JOIN acq.claim_policy_action cpa ON (
10155                     cpa.claim_policy = cp.id
10156
10157                     -- we only care about claim policy actions whose claim
10158                     -- interval we'd reached or exceeded
10159                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10160
10161                     -- filter out all claim policy actions where claim events
10162                     -- have occurred on or after the action's action_interval
10163                     AND NOT EXISTS (
10164                         SELECT 1
10165                         FROM
10166                             acq.claim_event evt
10167                             JOIN acq.claim claim ON (
10168                                 claim.id = evt.claim
10169                                 AND claim.lineitem_detail = lid.id
10170                             )
10171                         WHERE
10172                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10173                     )
10174                 )
10175             WHERE
10176                 lid.cancel_reason IS NULL
10177                 AND li.cancel_reason IS NULL -- belt/suspenders
10178                 AND po.cancel_reason IS NULL -- belt/suspenders
10179                 AND lid.recv_time IS NULL
10180                 AND po.state = 'on-order'
10181             ORDER BY 1, 2, 3, 4, 5
10182
10183                 </oils_persist:source_definition>
10184                 <fields>
10185                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10186                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10187                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10188                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10189                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10190                 </fields>
10191                 <links>
10192                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10193                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10194                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10195                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10196                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10197                 </links>
10198         </class>
10199         <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">
10200                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10201                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10202                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10203                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10204                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10205                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10206                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10207                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10208                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10209                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10210                 </fields>
10211                 <links>
10212                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10213                 </links>
10214     </class>
10215         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10216                 <oils_persist:source_definition>
10217             SELECT * FROM acq.lineitem_summary 
10218                                 WHERE item_count > (invoice_count + cancel_count)
10219         </oils_persist:source_definition>
10220                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10221                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10222                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10223                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10224                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10225                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10226                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10227                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10228                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10229                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10230                 </fields>
10231                 <links>
10232                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10233                 </links>
10234     </class>
10235         <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">
10236                 <oils_persist:source_definition>
10237
10238                         SELECT  t.*
10239                           FROM  action.transit_copy t
10240                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10241                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10242                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10243
10244                 </oils_persist:source_definition>
10245                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10246                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10247                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10248                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10249                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10250                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10251                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10252                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10253                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10254                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10255                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10256                 </fields>
10257                 <links>
10258                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10259                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10260                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10261                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10262                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10263                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10264                 </links>
10265         </class>
10266
10267     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10268                 <oils_persist:source_definition>
10269
10270         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10271                 SELECT
10272                         cp.id as copy,
10273                         COUNT(circ.id),
10274                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10275                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10276                 FROM
10277                         asset.copy cp
10278                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10279                 GROUP BY 1, 3, 4
10280                 UNION
10281                 SELECT
10282                         cp.id as copy,
10283                         COUNT(circ.id),
10284                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10285                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10286                 FROM
10287                         asset.copy cp
10288                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10289                 GROUP BY 1, 3, 4
10290                 UNION
10291                 SELECT
10292                         id as copy,
10293                         circ_count,
10294                         -1 AS year,
10295                         false as is_renewal
10296                 FROM
10297                         extend_reporter.legacy_circ_count
10298         )x GROUP BY 1, 3, 4
10299
10300                 </oils_persist:source_definition>
10301         <fields>
10302             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10303             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10304             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10305             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10306         </fields>
10307                 <links>
10308                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10309                 </links>
10310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10311                         <actions>
10312                                 <retrieve/>
10313                         </actions>
10314                 </permacrud>
10315     </class>
10316
10317         <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">
10318                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10319                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10320                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10321                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10322                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10323                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10324                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10325                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10326                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10327                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10328                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10329                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10330                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10331                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10332                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10333                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10334                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10335                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10336                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10337                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10338                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10339                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10340                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10341                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10342                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10343                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10344                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10345                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10346                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10347                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10348                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10349                 </fields>
10350                 <links>
10351                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10352                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10353                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10354                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10355                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10356                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10357                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10358                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10359                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10360                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10361                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10362                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10363                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10364                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10365                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10366                 </links>
10367         </class>
10368
10369     <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">
10370         <fields oils_persist:primary="id">
10371             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10372             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10373             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10374             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10375             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10376             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10377             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10378             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10379             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10380             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10381             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10382             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10383             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10384             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10385             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10386             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10387             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10388             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10389             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10390             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10391             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10392             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10393             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10394             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10395             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10396             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10397             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10398             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10399             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10400             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10401             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10402             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10403             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10404             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10405         </fields>
10406         <links>
10407             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10408             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10409             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10410             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10411             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10412         </links>
10413     </class>
10414
10415     <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">
10416         <fields oils_persist:primary="id">
10417             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10418             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10419             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10420             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10421         </fields>
10422         <links>
10423             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10424             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10425         </links>
10426     </class>
10427
10428     <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">
10429         <fields oils_persist:primary="owning_lib">
10430             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10431             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10432             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10433         </fields>
10434         <links>
10435             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10436         </links>
10437     </class>
10438
10439     <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">
10440         <fields oils_persist:primary="id">
10441             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10442             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10443             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10444             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10445             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10446         </fields>
10447         <links>
10448             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10449             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10450             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10451         </links>
10452     </class>
10453
10454     <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">
10455         <fields oils_persist:primary="circ_lib">
10456             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10457             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10458             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10459             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10460         </fields>
10461         <links>
10462             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10463             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10464         </links>
10465     </class>
10466
10467     <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">
10468         <fields oils_persist:primary="id">
10469             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10470             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10471             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10472             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10473             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10474         </fields>
10475         <links>
10476             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10477             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10478             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10479         </links>
10480     </class>
10481
10482     <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">
10483         <fields oils_persist:primary="home_ou">
10484             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10485             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10486             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10487             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10488         </fields>
10489         <links>
10490             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10491             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10492         </links>
10493     </class>
10494         <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">
10495                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10496                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10497                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10498                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10499                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10500                 </fields>
10501                 <links>
10502                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10503                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10504                 </links>
10505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10506                         <actions>
10507                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10508                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10509                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10510                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10511                         </actions>
10512                 </permacrud>
10513         </class>
10514         <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">
10515                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10516                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10517                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10518                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10519                 </fields>
10520                 <links>
10521                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10522                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10523                         </links>
10524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10525                 <actions>
10526                                 <create permission="ADMIN_ACQ_FUND_TAG">
10527                                         <context link="tag" field="owner"/>
10528                                 </create>
10529                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10530                                         <context link="tag" field="owner"/>
10531                                 </retrieve>
10532                                 <update permission="ADMIN_ACQ_FUND_TAG">
10533                                         <context link="tag" field="owner"/>
10534                                 </update>
10535                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10536                                         <context link="tag" field="owner"/>
10537                                 </delete>
10538                         </actions>
10539                 </permacrud>
10540         </class>
10541         <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">
10542                 <oils_persist:source_definition><![CDATA[
10543                 SELECT
10544                         poi.purchase_order AS purchase_order,
10545                         ii.invoice AS invoice,
10546                         NULL AS lineitem,
10547                         poi.id AS po_item,
10548                         NULL AS picklist
10549                 FROM
10550                         acq.po_item poi
10551                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10552                 UNION SELECT
10553                         jub.purchase_order AS purchase_order,
10554                         ie.invoice AS invoice,
10555                         jub.id AS lineitem,
10556                         NULL AS po_item,
10557                         jub.picklist AS picklist
10558                 FROM
10559                         acq.lineitem jub
10560                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10561                 UNION SELECT
10562                         ii.purchase_order AS purchase_order,
10563                         ii.invoice AS invoice,
10564                         NULL AS lineitem,
10565                         NULL AS po_item,
10566                         NULL AS picklist
10567                 FROM
10568                         acq.invoice_item ii
10569                 WHERE ii.po_item IS NULL
10570                 UNION SELECT
10571                         ie.purchase_order AS purchase_order,
10572                         ie.invoice AS invoice,
10573                         NULL AS lineitem,
10574                         NULL AS po_item,
10575                         NULL AS picklist
10576                 FROM
10577                         acq.invoice_entry ie
10578                 WHERE ie.lineitem IS NULL
10579                 UNION SELECT
10580                         NULL AS purchase_order,
10581                         NULL AS invoice,
10582                         jub.id AS lineitem,
10583                         NULL AS po_item,
10584                         jub.picklist AS picklist
10585                 FROM
10586                         acq.lineitem jub
10587                 WHERE jub.purchase_order IS NULL
10588                 ]]></oils_persist:source_definition>
10589                 <fields>
10590                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10591                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10592                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10593                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10594                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10595                 </fields>
10596                 <links>
10597                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10598                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10599                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10600                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10601                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10602                 </links>
10603         </class>
10604         <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">
10605                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10606                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10607                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10608                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10609                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10610                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10611                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10612                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10613                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10614                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10615                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10616                 </fields>
10617                 <links>
10618                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10619                 </links>
10620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10621                         <actions>
10622                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10623                                 <retrieve/>
10624                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10625                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10626                         </actions>
10627                 </permacrud>
10628         </class>
10629
10630         <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">
10631                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10633                         <field name="date_applied" reporter:datatype="timestamp"/>
10634                         <field name="org" reporter:datatype="org_unit"/>
10635                         <field name="original_value" reporter:datatype="text"/>
10636                         <field name="new_value" reporter:datatype="text"/>
10637                         <field name="field_name" reporter:datatype="link"/>
10638                 </fields>
10639                 <links>
10640                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10641                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10642                 </links>
10643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10644                         <actions>
10645                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10646                                 <retrieve/>
10647                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10648                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10649                         </actions>
10650                 </permacrud>
10651         </class>
10652         <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">
10653                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10654                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10655                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10656                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10657                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10658                 </fields>
10659                 <links>
10660                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10661                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10662                 </links>
10663         </class>
10664         <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">
10665                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10666                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10667                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10668                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10669                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10670                 </fields>
10671                 <links>
10672                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10673                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10674                 </links>
10675         </class>
10676
10677
10678         <!-- ********************************************************************************************************************* -->
10679
10680 </IDL>
10681
10682 <!--
10683     vim:noet:ts=4:sw=4:
10684 -->