]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Z39.50 Batch Search/Overlay : SQL / IDL
[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                 </fields>
374                 <links>
375                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
376                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
377                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <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">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <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">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <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">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <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">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <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">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <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">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <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">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <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">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
788                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
789                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
790                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
791                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
792                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
793                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
794                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
795                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
796                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
797                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
798                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
799                 </fields>
800                 <links>
801                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
802                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
803                 </links>
804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
805             <actions>
806                 <create permission="ADMIN_SVF" global_required="true"/>
807                 <retrieve/>
808                 <update permission="ADMIN_SVF" global_required="true"/>
809                 <delete permission="ADMIN_SVF" global_required="true"/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <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">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
819             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
820                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
821                 </fields>
822                 <links/>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
826                 <retrieve/>
827                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
829             </actions>
830         </permacrud>
831         </class>
832
833         <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">
834                 <fields oils_persist:primary="id">
835                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
836                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
837                 </fields>
838                 <links>
839                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
840                 </links>
841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
842             <actions>
843                 <retrieve/>
844             </actions>
845         </permacrud>
846         </class>
847
848         <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">
849                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
851                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
852                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
853                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
854                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
855                 </fields>
856                 <links>
857                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
858                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
859                 </links>
860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
861             <actions>
862                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
863                 <retrieve/>
864                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
866             </actions>
867         </permacrud>
868         </class>
869
870         <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">
871                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
873                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
874                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
878                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
879             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
880                 </fields>
881                 <links>
882                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
883                 </links>
884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
885             <actions>
886                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
887                 <retrieve/>
888                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
890             </actions>
891         </permacrud>
892         </class>
893
894         <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">
895                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
896                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
897                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
898                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
899                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
900                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
901                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
902                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
903                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
904                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
905                 </fields>
906                 <links>
907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
908                 </links>
909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
910             <actions>
911                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
912                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
913                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915             </actions>
916         </permacrud>
917         </class>
918
919     <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">
920         <fields oils_persist:primary="name">
921             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
922             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
923             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
924             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
925             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
926             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
927             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
928             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
929             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
930             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
931         </fields>
932         <links>
933             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
934             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
935         </links>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
939                 <retrieve/>
940                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
942             </actions>
943         </permacrud>
944     </class>
945
946     <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">
947         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
948             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
949             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
950             <field reporter:label="Name" name="name" reporter:datatype="text"/>
951             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
952             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
953             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
954             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
955         </fields>
956         <links>
957             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
962                 <retrieve/>
963                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
965             </actions>
966         </permacrud>
967     </class>
968
969     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
970                         oils_obj:fieldmapper="config::z3950_index_field_map" 
971                         oils_persist:tablename="config.z3950_index_field_map" 
972                         reporter:label="Z39.50 Index Field Map">
973         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
974             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
975             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
976             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
977             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
978             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
979             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
980         </fields>
981         <links>
982             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
983             <link field="record_attr" reltype="has_a" key="id" map="" class="crad"/>
984             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
989                 <retrieve/>
990                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
991                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
992             </actions>
993         </permacrud>
994     </class>
995
996
997         <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">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
999                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1001                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1002                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1003                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1004                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1005                 </fields>
1006                 <links>
1007             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1008             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1009                 </links>
1010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1011                         <actions>
1012                                 <retrieve/>
1013                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1014                         </actions>
1015                 </permacrud>
1016         </class>
1017
1018         <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">
1019                 <fields oils_persist:primary="key">
1020                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1021                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1022                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1023                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1024                 </fields>
1025                 <links/>
1026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1027                         <actions>
1028                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1029                                 <retrieve/>
1030                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1031                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1032                         </actions>
1033                 </permacrud>
1034         </class>
1035
1036         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1037                 <fields oils_persist:primary="module">
1038                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1039                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1040                 </fields>
1041                 <links/>
1042         </class>
1043
1044         <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">
1045                 <fields oils_persist:primary="module">
1046                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1047                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1048                 </fields>
1049                 <links/>
1050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1051                         <actions>
1052                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1053                                 <retrieve/>
1054                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1055                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <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">
1061                 <fields oils_persist:primary="module">
1062                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1063                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1064                 </fields>
1065                 <links/>
1066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1067                         <actions>
1068                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1069                                 <retrieve/>
1070                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1071                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1072                         </actions>
1073                 </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields oils_persist:primary="module">
1078                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1079                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1080                 </fields>
1081                 <links/>
1082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1083                         <actions>
1084                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1085                                 <retrieve/>
1086                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1087                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1088                         </actions>
1089                 </permacrud>
1090         </class>
1091
1092         <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">
1093                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1094                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1095                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1096                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1097                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1098                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1099                 </fields>
1100                 <links>
1101                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1102                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1103                 </links>
1104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1105                         <actions>
1106                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1107                     <context link="event_def" field="owner"/>
1108                 </create>
1109                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1110                     <context link="event_def" field="owner"/>
1111                 </retrieve>
1112                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1113                     <context link="event_def" field="owner"/>
1114                 </update>
1115                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1116                     <context link="event_def" field="owner"/>
1117                 </delete>
1118                         </actions>
1119                 </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1124                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1125                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1126                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1127                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1128                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1129                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1130                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1131                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1132                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1133                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1134                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1135                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1136                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1137                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1138                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1139                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1140                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1141                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1142                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1143                 </fields>
1144                 <links>
1145                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1146                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1147                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1148                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1149                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1150                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1151                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1152                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1153                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1154                 </links>
1155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1156                         <actions>
1157                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1158                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1159                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                         </actions>
1162                 </permacrud>
1163         </class>
1164
1165         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1166                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1167                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1168                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1169                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1170                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1171                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1172                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1176                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1177                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1178                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1179                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1180                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1181                 </fields>
1182                 <links>
1183                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1184                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1185                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1186                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                 </links>
1188         </class>
1189
1190         <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">
1191                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1192                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1193                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1194                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1195                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1196                 </fields>
1197                 <links>
1198                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1199                 </links>
1200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1201                         <actions>
1202                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1203                     <context link="event_def" field="owner"/>
1204                 </create>
1205                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1206                     <context link="event_def" field="owner"/>
1207                 </retrieve>
1208                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1209                     <context link="event_def" field="owner"/>
1210                 </update>
1211                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1212                     <context link="event_def" field="owner"/>
1213                 </delete>
1214                         </actions>
1215                 </permacrud>
1216         </class>
1217
1218         <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">
1219                 <oils_persist:source_definition><![CDATA[
1220                 SELECT  atevdef.hook,
1221                         atevdef.name,
1222                         atevdef.reactor,
1223                         atev.id,
1224                         atev.event_def,
1225                         atev.add_time,
1226                         atev.run_time,
1227                         atev.start_time,
1228                         atev.update_time,
1229                         atev.complete_time,
1230                         atev.update_process,
1231                         atev.state,
1232                         atev.user_data,
1233                         atev.template_output,
1234                         atev.error_output,
1235                         atev.async_output,
1236                         targ_circ.id AS target_circ,
1237                         targ_ahr.id AS target_hold,
1238                         COALESCE(
1239                                 targ_circ.circ_lib,
1240                                 targ_ahr.pickup_lib
1241                         ) AS perm_lib
1242                 FROM action_trigger.event atev
1243                 JOIN action_trigger.event_definition atevdef ON
1244                         (atevdef.id = atev.event_def)
1245                 JOIN action_trigger.hook ath ON
1246                         (ath.key = atevdef.hook)
1247                 LEFT JOIN action.circulation targ_circ ON
1248                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1249                 LEFT JOIN action.hold_request targ_ahr ON
1250                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1251                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1252                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1253                                 'circ.staff.max_visible_event_age',
1254                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1255                         ) UNION
1256                         SELECT '1000 YEARS'::INTERVAL AS value
1257                 ) ous)
1258                 ]]></oils_persist:source_definition>
1259                 <fields oils_persist:primary="id">
1260                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1261                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1262                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1263                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1264                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1265                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1266                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1267                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1271                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1272                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1273                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1274                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1275                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1276                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1277                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1278                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1279                 </fields>
1280                 <links>
1281                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1282                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1283                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1284                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1286                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1287                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1288                 </links>
1289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1290                         <actions>
1291                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1292                         </actions>
1293                 </permacrud>
1294         </class>
1295
1296         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1298                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1299                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1300                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1301                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1302                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1303                 </fields>
1304                 <links>
1305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1306                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1307                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1308                 </links>
1309         </class>
1310
1311         <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">
1312                 <fields oils_persist:primary="code">
1313                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1314                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1315                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1316                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1318                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1319                 </fields>
1320                 <links/>
1321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1322             <actions>
1323                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1324                 <retrieve/>
1325                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1326                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1327             </actions>
1328         </permacrud>
1329         </class>
1330
1331         <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">
1332                 <fields oils_persist:primary="code">
1333                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1334                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1335                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1336                 </fields>
1337                 <links/>
1338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1339             <actions>
1340                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1341                 <retrieve/>
1342                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1343                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1344             </actions>
1345         </permacrud>
1346         </class>
1347
1348         <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">
1349                 <fields oils_persist:primary="code">
1350                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1351                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1352                 </fields>
1353                 <links/>
1354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1355             <actions>
1356                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1357                 <retrieve/>
1358                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1359                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1360             </actions>
1361         </permacrud>
1362         </class>
1363
1364         <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">
1365                 <fields oils_persist:primary="code">
1366                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1367                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1368                 </fields>
1369                 <links/>
1370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1371             <actions>
1372                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1373                 <retrieve/>
1374                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1375                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1376             </actions>
1377         </permacrud>
1378         </class>
1379
1380         <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">
1381                 <fields oils_persist:primary="code">
1382                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1383                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1384                 </fields>
1385                 <links/>
1386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1387             <actions>
1388                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1389                 <retrieve/>
1390                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1391                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1392             </actions>
1393         </permacrud>
1394         </class>
1395
1396         <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">
1397                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1398                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1399                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1400                 </fields>
1401                 <links/>
1402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1403             <actions>
1404                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1405                 <retrieve/>
1406                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1407                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1408             </actions>
1409         </permacrud>
1410         </class>
1411
1412         <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">
1413                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1414                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1415                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1416                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1417                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1418                 </fields>
1419         <links>
1420             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1421             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1422             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1423         </links>
1424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1425             <actions>
1426                 <create permission="UPDATE_COPY">
1427                     <context link="target_copy" field="circ_lib"/>
1428                 </create>
1429                 <retrieve/>
1430                 <update permission="UPDATE_COPY">
1431                     <context link="target_copy" field="circ_lib"/>
1432                 </update>
1433                 <delete permission="UPDATE_COPY">
1434                     <context link="target_copy" field="circ_lib"/>
1435                 </delete>
1436             </actions>
1437         </permacrud>
1438         </class>
1439
1440         <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">
1441                 <fields oils_persist:primary="code">
1442                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1443                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1444                 </fields>
1445                 <links/>
1446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1447             <actions>
1448                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1449                 <retrieve/>
1450                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1451                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1452             </actions>
1453         </permacrud>
1454         </class>
1455
1456         <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">
1457                 <fields oils_persist:primary="code">
1458                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1459                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1460                 </fields>
1461                 <links/>
1462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1463             <actions>
1464                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1465                 <retrieve/>
1466                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1467                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1468             </actions>
1469         </permacrud>
1470         </class>
1471
1472         <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">
1473                 <fields oils_persist:primary="code">
1474                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1475                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1476                 </fields>
1477                 <links/>
1478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1479             <actions>
1480                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1481                 <retrieve/>
1482                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1483                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1484             </actions>
1485         </permacrud>
1486         </class>
1487
1488     <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">
1489         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1490             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1491             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1492             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1493             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1494             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1495             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1496             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1497             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1498             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1499             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1500             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1501             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1506             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1507         </fields>
1508         <links/>
1509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1510             <actions>
1511                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1512                 <retrieve/>
1513                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1514                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1515             </actions>
1516         </permacrud>
1517     </class>
1518
1519     <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">
1520         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1521             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1522             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1523             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1524             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1525             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1526             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1527             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1528             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1529             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1530             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1531             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1532             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1533             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1534             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1535             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1536             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1537             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1538             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1539             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1540         </fields>
1541         <links/>
1542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1543             <actions>
1544                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1545                 <retrieve/>
1546                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1547                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1548             </actions>
1549         </permacrud>
1550     </class>
1551
1552     <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">
1553         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1554             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1555             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1556             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1557             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1558             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1559         </fields>
1560         <links>
1561             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1562             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1563             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1564         </links>
1565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1566             <actions>
1567                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1568                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1569                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571             </actions>
1572         </permacrud>
1573     </class>
1574
1575         <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">
1576                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1577                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1578                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1579                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1580                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1581                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1582                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1586                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1587                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1588                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1589                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1593             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1594                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1595                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1596                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1597                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1598                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1599                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1600                 </fields>
1601                 <links>
1602                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1603                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1604                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1608                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1609                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1610                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1611                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1612                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1613                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1614                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1615             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1616                 </links>
1617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1618             <actions>
1619                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1620                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1621                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623             </actions>
1624         </permacrud>
1625         </class>
1626
1627         <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">
1628                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1629                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1630                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1631                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1632                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1633                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1634                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1635                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1636                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1637                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1638                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1639                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1640                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1644             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1645                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1646                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1647             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1648                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1649                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1650                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1651                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1652             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1653             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1654             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1655                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1656                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1657                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1658                 </fields>
1659                 <links>
1660                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1661                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1662                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1665                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1666                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1667                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1668                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1669                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1670                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1671                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1672                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1673                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1674             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1675                 </links>
1676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1677             <actions>
1678                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1679                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1680                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682             </actions>
1683         </permacrud>
1684         </class>
1685
1686     <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">
1687         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1688             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1689             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1690             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1691         </fields>
1692         <links/>
1693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1694             <actions>
1695                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1696                 <retrieve/>
1697                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1698                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1699             </actions>
1700         </permacrud>
1701     </class>
1702
1703     <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">
1704         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1705             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1706             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1707             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1708             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1709             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1710             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1711             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1712         </fields>
1713         <links>
1714             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1715         </links>
1716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1717             <actions>
1718                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1719                 <retrieve/>
1720                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1721                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1722             </actions>
1723         </permacrud>
1724     </class>
1725
1726     <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">
1727         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1728             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1729             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1730             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1731             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1732             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1733         </fields>
1734         <links>
1735             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1736             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1737         </links>
1738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1739             <actions>
1740                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1741                     <context link="matchpoint" field="org_unit"/>
1742                 </create>
1743                 <retrieve/>
1744                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1745                     <context link="matchpoint" field="org_unit"/>
1746                 </update>
1747                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1748                     <context link="matchpoint" field="org_unit"/>
1749                 </delete>
1750             </actions>
1751         </permacrud>
1752     </class>
1753
1754     <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">
1755         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1756             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1757             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1758             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1759         </fields>
1760         <links>
1761             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1762             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1763         </links>
1764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1765             <actions>
1766                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1767                     <context link="limit_set" field="owning_lib"/>
1768                 </create>
1769                 <retrieve/>
1770                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1771                     <context link="limit_set" field="owning_lib"/>
1772                 </update>
1773                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1774                     <context link="limit_set" field="owning_lib"/>
1775                 </delete>
1776             </actions>
1777         </permacrud>
1778     </class>
1779     <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">
1780         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1781             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1782             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1783             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1784         </fields>
1785         <links>
1786             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1787             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1788         </links>
1789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1790             <actions>
1791                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1792                     <context link="limit_set" field="owning_lib"/>
1793                 </create>
1794                 <retrieve/>
1795                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1796                     <context link="limit_set" field="owning_lib"/>
1797                 </update>
1798                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1799                     <context link="limit_set" field="owning_lib"/>
1800                 </delete>
1801             </actions>
1802         </permacrud>
1803     </class>
1804
1805     <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">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1807             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1808             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1809             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1810             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1811         </fields>
1812         <links>
1813             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1814             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1815         </links>
1816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1817             <actions>
1818                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1819                     <context link="limit_set" field="owning_lib"/>
1820                 </create>
1821                 <retrieve/>
1822                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1823                     <context link="limit_set" field="owning_lib"/>
1824                 </update>
1825                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1826                     <context link="limit_set" field="owning_lib"/>
1827                 </delete>
1828             </actions>
1829         </permacrud>
1830     </class>
1831
1832         <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">
1833                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1834                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1843                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1850                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1851                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1853                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1854                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1855                 </fields>
1856                 <links>
1857                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1858                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1859                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1860                 </links>
1861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1862             <actions>
1863                 <create permission="ADMIN_SURVEY">
1864                     <context link="survey" field="owner"/>
1865                 </create>
1866                 <retrieve/>
1867                 <update permission="ADMIN_SURVEY">
1868                     <context link="survey" field="owner"/>
1869                 </update>
1870                 <delete permission="ADMIN_SURVEY">
1871                     <context link="survey" field="owner"/>
1872                 </delete>
1873             </actions>
1874         </permacrud>
1875         </class>
1876         <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">
1877                 <fields oils_persist:primary="id" oils_persist:sequence="">
1878                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1879                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1880                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1881                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1882                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1883                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1884                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1885                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1886                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1887                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1888                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1889                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1890                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1891                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1892                 </fields>
1893                 <links>
1894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1895                 </links>
1896         </class>
1897         <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">
1898                 <fields oils_persist:primary="id" oils_persist:sequence="">
1899                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1900                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1901                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1902                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1903                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1904                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1905                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1906                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1907                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1908                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1909                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1910                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1911                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1912                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1913                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1914                 </fields>
1915                 <links>
1916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1917                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1918                 </links>
1919         </class>
1920         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1921                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1922                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1923                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1924                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1925                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1926                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1927                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1928                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1929                 </fields>
1930                 <links>
1931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1932                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1933                 </links>
1934         </class>
1935         <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">
1936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1937                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1938                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1939                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1940                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1941                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1942                 </fields>
1943                 <links>
1944                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1945                 </links>
1946         </class>
1947         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1949                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1950                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1951                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1952                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1953                 </fields>
1954                 <links>
1955                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1956                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1957                 </links>
1958         </class>
1959         <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">
1960                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1961                         <field name="field" reporter:datatype="link"/>
1962                         <field name="id" reporter:datatype="id" />
1963                         <field name="source" reporter:datatype="link"/>
1964                         <field name="value" reporter:datatype="text"/>
1965                 </fields>
1966                 <links>
1967                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1968                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1969                 </links>
1970         </class>
1971         <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">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1973                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1974                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1975                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1976                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1977                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1978                 </fields>
1979                 <links>
1980                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1981                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1982                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1983                 </links>
1984         </class>
1985         <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">
1986                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1987                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1988                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1989                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1990                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1991                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1992                 </fields>
1993                 <links>
1994                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1995                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1996                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1997                 </links>
1998         </class>
1999         <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">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2001                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2002                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2003                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2004                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2005                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2006                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2007                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2008                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2009                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2010                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2011                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2012                 </fields>
2013                 <links>
2014                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2015                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2016                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2017                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2018                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2019                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2020                 </links>
2021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022             <actions>
2023                 <create permission="TRANSIT_COPY" context_field="owner">
2024                     <context link="target_copy" field="circ_lib"/>
2025                 </create>
2026                 <retrieve/>
2027                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2028                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2029             </actions>
2030         </permacrud>
2031         </class>
2032         <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">
2033                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2034                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2035                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2036                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2038                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2039                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2040                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2041                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2042                 </fields>
2043                 <links>
2044                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2045                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2046                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2047                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2048                 </links>
2049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2050             <actions>
2051                 <create permission="ADMIN_SURVEY">
2052                     <context link="survey" field="owner"/>
2053                 </create>
2054                 <retrieve/>
2055                 <update permission="ADMIN_SURVEY">
2056                     <context link="survey" field="owner"/>
2057                 </update>
2058                 <delete permission="ADMIN_SURVEY">
2059                     <context link="survey" field="owner"/>
2060                 </delete>
2061             </actions>
2062         </permacrud>
2063         </class>
2064         <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">
2065                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2066                         <field name="bucket" />
2067                         <field name="id" reporter:datatype="id" />
2068                         <field name="target_copy" reporter:datatype="link"/>
2069                         <field name="create_time" reporter:datatype="timestamp" />
2070                         <field name="pos" reporter:datatype="int" />
2071                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2072                 </fields>
2073                 <links>
2074                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2075                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2076             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2077                 </links>
2078         </class>
2079         <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">
2080                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2081                         <field name="id" reporter:datatype="id" />
2082                         <field name="item" reporter:datatype="link"/>
2083                         <field name="note" reporter:datatype="text" />
2084                 </fields>
2085                 <links>
2086                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2087                 </links>
2088         </class>
2089
2090         <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">
2091                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2092                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2093                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2094                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2095                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2096                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2097                 </fields>
2098                 <links>
2099                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2100                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2101                 </links>
2102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2103                         <actions>
2104                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2105                                 <retrieve/>
2106                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2108                         </actions>
2109                 </permacrud>
2110         </class>
2111
2112         <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">
2113                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2114                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2115                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2116                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2117                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2118                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2119                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2120                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2121                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2122                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2123                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2124                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2125                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2126                 </fields>
2127                 <links>
2128                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2129                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2130                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2131                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2132                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2133                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2134                 </links>
2135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136                         <actions>
2137                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2138                                 <retrieve/>
2139                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2140                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                         </actions>
2142                 </permacrud>
2143         </class>
2144
2145         <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">
2146                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2147                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2148                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2149                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2150                 </fields>
2151                 <links>
2152                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2153                 </links>
2154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2155                         <actions>
2156                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2157                                 <retrieve/>
2158                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2160                         </actions>
2161                 </permacrud>
2162         </class>
2163
2164         <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">
2165                 <fields oils_persist:primary="code">
2166                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2167                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2168                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2169                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2170                 </fields>
2171                 <links>
2172                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2173                 </links>
2174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2175                         <actions>
2176                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2177                                 <retrieve/>
2178                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2179                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2180                         </actions>
2181                 </permacrud>
2182         </class>
2183
2184         <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">
2185                 <fields oils_persist:primary="code">
2186                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2187                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2188                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2189                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2190                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2191                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2192                 </fields>
2193                 <links>
2194                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2195                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2196                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2197                 </links>
2198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2199                         <actions>
2200                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2201                                 <retrieve/>
2202                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2204                         </actions>
2205                 </permacrud>
2206         </class>
2207
2208     <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">
2209         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2210             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2211             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2212             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2213         </fields>
2214         <links>
2215             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2216             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2217         </links>
2218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2219             <actions>
2220                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2221                 <retrieve/>
2222                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2223                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2224             </actions>
2225         </permacrud>
2226     </class>
2227
2228         <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">
2229                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2230                         <field name="active" reporter:datatype="bool"/>
2231                         <field name="create_date" reporter:datatype="timestamp"/>
2232                         <field name="creator" />
2233                         <field name="deleted" reporter:datatype="bool"/>
2234                         <field name="edit_date" reporter:datatype="timestamp"/>
2235                         <field name="editor" />
2236                         <field name="id" reporter:datatype="id" />
2237                         <field name="last_xact_id" />
2238                         <field name="marc" />
2239                         <field name="source" />
2240                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2241                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2242                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2243                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2244                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2245                 </fields>
2246                 <links>
2247                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2249                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2250                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2251                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2252                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2253                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2254                 </links>
2255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2256                         <actions>
2257                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2258                                 <retrieve/>
2259                                 <update permission="UPDATE_MARC" global_required="true"/>
2260                                 <delete permission="UPDATE_MARC" global_required="true"/>
2261                         </actions>
2262                 </permacrud>
2263         </class>
2264         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2265                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2266                         <field name="char_encoding" />
2267                         <field name="id" />
2268                         <field name="record" />
2269                         <field name="record_status" />
2270                         <field name="thesaurus" />
2271                 </fields>
2272                 <links>
2273                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2274                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2275                 </links>
2276         </class>
2277         <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">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2279                         <field name="id" reporter:datatype="id" />
2280                         <field name="bib" reporter:datatype="link" />
2281                         <field name="authority" reporter:datatype="link" />
2282                 </fields>
2283                 <links>
2284                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2285                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2286                 </links>
2287         </class>
2288         <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">
2289                 <fields oils_persist:primary="code" oils_persist:sequence="">
2290                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2291                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2292                 </fields>
2293                 <links/>
2294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2295             <actions>
2296                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2297                 <retrieve/>
2298                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2299                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2300             </actions>
2301         </permacrud>
2302         </class>
2303         <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">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2305                         <field name="accepting_usr" />
2306                         <field name="amount" reporter:datatype="money" />
2307                         <field name="amount_collected" reporter:datatype="money" />
2308                         <field name="approval_code" reporter:datatype="text"/>
2309                         <field name="cash_drawer" reporter:datatype="link"/>
2310                         <field name="cc_first_name" reporter:datatype="text"/>
2311                         <field name="cc_last_name" reporter:datatype="text"/>
2312                         <field name="cc_number" reporter:datatype="text"/>
2313                         <field name="cc_order_number" reporter:datatype="text"/>
2314                         <field name="cc_type" reporter:datatype="text"/>
2315                         <field name="cc_processor" reporter:datatype="text"/>
2316                         <field name="expire_month" reporter:datatype="int" />
2317                         <field name="expire_year" reporter:datatype="int" />
2318                         <field name="id" reporter:datatype="id" />
2319                         <field name="note" reporter:datatype="text"/>
2320                         <field name="payment_ts" reporter:datatype="timestamp"/>
2321                         <field name="xact" reporter:datatype="link"/>
2322                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2323                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2324                 </fields>
2325                 <links>
2326                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2327                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2328                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2329                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2330                 </links>
2331         </class>
2332         <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">
2333                 <fields oils_persist:primary="name">
2334                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2335                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2336                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2337                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2338                 </fields>
2339                 <links/>
2340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2341             <actions>
2342                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2343                 <retrieve/>
2344                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2345                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2346             </actions>
2347         </permacrud>
2348         </class>
2349
2350         <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">
2351                 <fields oils_persist:primary="alias">
2352                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2353                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2354                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2355                 </fields>
2356                 <links>
2357                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2358                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2359                 </links>
2360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2361             <actions>
2362                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2363                 <retrieve/>
2364                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2365                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2366             </actions>
2367         </permacrud>
2368         </class>
2369
2370         <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">
2371                 <fields oils_persist:primary="name">
2372                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2373                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2374                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2375                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2376                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2377                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2378                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2379                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2380                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2381                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2382                 </fields>
2383                 <links>
2384                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2385                 </links>
2386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2387             <actions>
2388                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2389                 <retrieve/>
2390                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2391                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395
2396         <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">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2398                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2399                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2400                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2401                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2402                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2403                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2404                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2405                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2406                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2407                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2408                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2409                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2410                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2411                 </fields>
2412                 <links>
2413                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2414                 </links>
2415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2416             <actions>
2417                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2418                 <retrieve/>
2419                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2420                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2421             </actions>
2422         </permacrud>
2423         </class>
2424         <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">
2425                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2426                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2427                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2428                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2429                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2430                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2431                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2432                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2433                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2434                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2435                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2436                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2437                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2438                 </fields>
2439                 <links>
2440                 </links>
2441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2442                         <actions>
2443                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2444                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2445                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2446                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                         </actions>
2448                 </permacrud>
2449         </class>
2450         <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">
2451                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2452                         <field name="id" reporter:datatype="id" />
2453                         <field name="name" reporter:datatype="text"/>
2454                         <field name="xpath" reporter:datatype="text"/>
2455                         <field name="format" reporter:datatype="link"/>
2456                         <field name="first_word" reporter:datatype="bool" />
2457                 </fields>
2458                 <links/>
2459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460             <actions>
2461                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2462                 <retrieve/>
2463                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2464                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2465             </actions>
2466         </permacrud>
2467         </class>
2468         <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">
2469                 <fields oils_persist:primary="code" oils_persist:sequence="">
2470                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2471                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2472                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2473                 </fields>
2474                 <links/>
2475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2476             <actions>
2477                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2478                 <retrieve/>
2479                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2480                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2481             </actions>
2482         </permacrud>
2483         </class>
2484         <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">
2485                 <fields oils_persist:primary="code" oils_persist:sequence="">
2486                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2487                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2488                 </fields>
2489                 <links/>
2490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2491             <actions>
2492                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2493                 <retrieve/>
2494                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2495                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2496             </actions>
2497         </permacrud>
2498         </class>
2499     <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">
2500         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2501             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2502             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2503             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2504             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2505         </fields>
2506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2507             <actions>
2508                 <retrieve/>
2509             </actions>
2510         </permacrud>
2511     </class>
2512         <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">
2513                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2514                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2515                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2516                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2517                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2518                 </fields>
2519                 <links>
2520                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2521                 </links>
2522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2523             <actions>
2524                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2525                 <retrieve/>
2526                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2527                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2528             </actions>
2529         </permacrud>
2530         </class>
2531         <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">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2533                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2534                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2535                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2536                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2537                 </fields>
2538                 <links>
2539                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2540                 </links>
2541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2542             <actions>
2543                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2544                 <retrieve/>
2545                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2546                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2547             </actions>
2548         </permacrud>
2549         </class>
2550         <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">
2551                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2552                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2554                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2555                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2556                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2557                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2558                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2559                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2560                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2561                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2562                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2563                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2564                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2565                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2566                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2567                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2568                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2569                 </fields>
2570                 <links>
2571                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2572                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2574                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2575                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2576                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2577                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2578                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2579                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2580                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2581                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2582                 </links>
2583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2584             <actions>
2585                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2586                 <retrieve/>
2587                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2588                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2589             </actions>
2590         </permacrud>
2591         </class>
2592         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2593                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2594                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2595                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2596                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2597                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2598                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2599                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2601                 </fields>
2602                 <links>
2603                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2604                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2605         </links>
2606         </class>
2607         <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">
2608                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2609                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2610                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2611                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2612                 </fields>
2613                 <links>
2614                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2615                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2616                 </links>
2617         </class>
2618         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2619                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2620                         <field name="id" reporter:datatype="id" />
2621                         <field name="value" oils_persist:i18n="true" />
2622                 </fields>
2623                 <links/>
2624         </class>
2625         <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">
2626                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2627                         <field name="balance_owed" reporter:datatype="money" />
2628                         <field name="total_owed" reporter:datatype="money" />
2629                         <field name="total_paid" reporter:datatype="money" />
2630                         <field name="usr" reporter:datatype="link"/>
2631                 </fields>
2632                 <links>
2633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2634         </links>
2635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2636             <actions>
2637                 <retrieve permission="VIEW_USER">
2638                     <context link="usr" field="home_ou"/>
2639                 </retrieve>
2640             </actions>
2641         </permacrud>
2642         </class>
2643         <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">
2644                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2645                         <field name="collector" />
2646                         <field name="enter_time" reporter:datatype="timestamp"/>
2647                         <field name="id" reporter:datatype="id" />
2648                         <field name="location" reporter:datatype="link"/>
2649                         <field name="usr" reporter:datatype="link"/>
2650                 </fields>
2651                 <links>
2652                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2653                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2654                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2655                 </links>
2656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2657             <actions>
2658                 <create permission="money.collections_tracker.create" context_field="location"/>
2659                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2660                 <delete permission="money.collections_tracker.create" context_field="location"/>
2661             </actions>
2662         </permacrud>
2663         </class>
2664         <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">
2665                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2666                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2667                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2668                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2669                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2670                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2671                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2672                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2674                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2675                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2676                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2677                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2678                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2679                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2680                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2681                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2682                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2683                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2684                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2685                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2686                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2698                 </fields>
2699                 <links>
2700                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2701                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2702                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2703                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2704                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2705                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2706                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2707                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2708                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2709                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2710                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2711                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2712                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2713                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2714                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2715                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2716                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2717                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2718                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2719                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2720                 </links>
2721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2722             <actions>
2723                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2724                 <retrieve/>
2725                 <update permission="UPDATE_MARC" global_required="true"/>
2726             </actions>
2727         </permacrud>
2728         </class>
2729         <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">
2730                 <fields oils_persist:primary="id">
2731                         <field name="dow_0_close" />
2732                         <field name="dow_0_open" />
2733                         <field name="dow_1_close" />
2734                         <field name="dow_1_open" />
2735                         <field name="dow_2_close" />
2736                         <field name="dow_2_open" />
2737                         <field name="dow_3_close" />
2738                         <field name="dow_3_open" />
2739                         <field name="dow_4_close" />
2740                         <field name="dow_4_open" />
2741                         <field name="dow_5_close" />
2742                         <field name="dow_5_open" />
2743                         <field name="dow_6_close" />
2744                         <field name="dow_6_open" />
2745                         <field name="id" reporter:datatype="id" />
2746                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2747                 </fields>
2748                 <links>
2749                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2750                 </links>
2751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2752             <actions>
2753                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2754                 <retrieve/>
2755                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2756                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2757             </actions>
2758         </permacrud>
2759         </class>
2760         <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">
2761                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2762                         <field name="id" reporter:datatype="id" />
2763                         <field name="record" reporter:datatype="link"/>
2764                         <field name="label" reporter:datatype="text"/>
2765                         <field name="label_sortkey" reporter:datatype="text"/>
2766                 </fields>
2767                 <links>
2768                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2769                 </links>
2770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2771             <actions>
2772                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2773                 <retrieve/>
2774                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2775                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2776             </actions>
2777         </permacrud>
2778         </class>
2779         <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">
2780                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2781                         <field name="id" reporter:datatype="id" />
2782                         <field name="target_copy" reporter:datatype="link" />
2783                         <field name="part" reporter:datatype="link"/>
2784                 </fields>
2785                 <links>
2786                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2787                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2788                 </links>
2789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2790             <actions>
2791                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2792                 <retrieve/>
2793                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2794                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2795             </actions>
2796         </permacrud>
2797         </class>
2798         <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">
2799                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2800                         <field name="close_end" reporter:datatype="timestamp" />
2801                         <field name="close_start" reporter:datatype="timestamp" />
2802                         <field name="id" reporter:datatype="id" />
2803                         <field name="org_unit" reporter:datatype="org_unit"/>
2804                         <field name="reason" reporter:datatype="text"/>
2805                 </fields>
2806                 <links>
2807                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2808                 </links>
2809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2810             <actions>
2811                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2812                 <retrieve/>
2813                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2814                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2815             </actions>
2816         </permacrud>
2817         </class>
2818         <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">
2819                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2820                         <field name="extended" reporter:datatype="interval"/>
2821                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2822                         <field name="max_renewals" reporter:datatype="int" />
2823                         <field name="name" reporter:datatype="text"/>
2824                         <field name="normal" reporter:datatype="interval"/>
2825                         <field name="shrt" reporter:datatype="interval"/>
2826                 </fields>
2827                 <links>
2828                 </links>
2829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2830             <actions>
2831                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2832                 <retrieve/>
2833                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2834                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2835             </actions>
2836         </permacrud>
2837         </class>
2838
2839         <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">
2840                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2841                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2842                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2843             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2844                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2845             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2846                 </fields>
2847                 <links>
2848             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2849                 </links>
2850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2851             <actions>
2852                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2853                 <retrieve/>
2854                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2855                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2856             </actions>
2857                 </permacrud>
2858         </class>
2859
2860         <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">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2863                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2864                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2865             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2866                 </fields>
2867                 <links>
2868                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2869                 </links>
2870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2871             <actions>
2872                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2873                 <retrieve/>
2874                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2875                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2876             </actions>
2877                 </permacrud>
2878         </class>
2879
2880         <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">
2881                 <fields oils_persist:primary="id" oils_persist:sequence="">
2882                         <field name="balance_owed" reporter:datatype="money"/>
2883                         <field name="id" reporter:datatype="id" />
2884                         <field name="last_billing_note" reporter:datatype="text"/>
2885                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2886                         <field name="last_billing_type" reporter:datatype="text"/>
2887                         <field name="last_payment_note" reporter:datatype="text"/>
2888                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2889                         <field name="last_payment_type" reporter:datatype="text"/>
2890                         <field name="total_owed" reporter:datatype="money"/>
2891                         <field name="total_paid" reporter:datatype="money"/>
2892                         <field name="usr" reporter:datatype="link"/>
2893                         <field name="xact_finish" reporter:datatype="timestamp" />
2894                         <field name="xact_start" reporter:datatype="timestamp" />
2895                         <field name="xact_type" reporter:datatype="text"/>
2896                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2897                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2898                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="billing_location" reporter:datatype="link"/>
2901                 </fields>
2902                 <links>
2903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2904                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2905                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2906                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2907                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2908                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2909                 </links>
2910         </class>
2911         <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">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2913                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2914                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2915                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2916                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2925                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2926                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2927                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2928                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2929                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2930                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2931                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2932                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2933                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2934                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2935                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2936                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2937                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2938                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2939                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2940                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2941                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2942                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2943                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2944                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2945                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2946                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2947                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2948                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2949                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2950                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2951                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2952                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2953                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2954                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2955                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2956                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2957                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2958                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2959                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2960                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2961                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2962                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2963                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2965                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2966                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2968                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2976                 </fields>
2977                 <links>
2978                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2979                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2980                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2981                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2982                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2983                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2984                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2985                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2986                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2987                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2988                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2989                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2990                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2991                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2992                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2993                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2994                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2995                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2996                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2997                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2998                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2999                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3000                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3001                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3002                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3003                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3004                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3005                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3006                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3007                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3008                 </links>
3009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010                         <actions>
3011                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3012                         </actions>
3013                 </permacrud>
3014         </class>
3015         <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">
3016                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3017                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3018                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3019                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3020                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3021                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3022                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3023                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3024                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3025         </fields>
3026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3027                         <actions>
3028                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3029                                 <retrieve/>
3030                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3031                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3032                         </actions>
3033                 </permacrud>
3034         </class>
3035         <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">
3036                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3037                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3038                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3039                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3040                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3041         </fields>
3042         <links>
3043                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3044                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3045                 </links>
3046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3047                         <actions>
3048                                 <retrieve permission="RUN_REPORTS">
3049                                         <context link="usr" field="home_ou" />
3050                                 </retrieve>
3051                         </actions>
3052                 </permacrud>
3053         </class>
3054         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3056                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3057                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3058                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3059                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3060                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3061                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3062         </fields>
3063         <links>
3064                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3065                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3066                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3067                 </links>
3068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3069                         <actions>
3070                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3071                                         <context link="usr" field="home_ou" />
3072                                         <context link="ws" field="owning_lib" />
3073                                 </retrieve>
3074                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3075                                         <context link="usr" field="home_ou" />
3076                                         <context link="ws" field="owning_lib" />
3077                                 </create>
3078                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3079                                         <context link="usr" field="home_ou" />
3080                                         <context link="ws" field="owning_lib" />
3081                                 </update>
3082                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3083                                         <context link="usr" field="home_ou" />
3084                                         <context link="ws" field="owning_lib" />
3085                                 </delete>
3086                         </actions>
3087                 </permacrud>
3088         </class>
3089         <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">
3090                 <fields oils_persist:primary="name">
3091                         <field name="name" reporter:datatype="text"/>
3092                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3093                 </fields>
3094                 <links/>
3095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3096                         <actions>
3097                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3098                                 <retrieve/>
3099                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3100                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3101                         </actions>
3102                 </permacrud>
3103         </class>
3104         <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">
3105                 <fields oils_persist:primary="name">
3106                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3107                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3108                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3109                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3110                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3111                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3112                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3113                 </fields>
3114                 <links>
3115                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3116                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3117                 </links>
3118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3119                         <actions>
3120                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3121                                 <retrieve/>
3122                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3123                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3124                         </actions>
3125                 </permacrud>
3126         </class>
3127         <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">
3128                 <fields oils_persist:primary="name">
3129                         <field name="name" reporter:datatype="text"/>
3130                         <field name="label" reporter:datatype="text"/>
3131                         <field name="description" reporter:datatype="text"/>
3132                         <field name="datatype" reporter:datatype="text"/>
3133                         <field name="view_perm" reporter:datatype="link"/>
3134                         <field name="update_perm" reporter:datatype="link"/>
3135                         <field name="fm_class" reporter:datatype="text"/>
3136                         <field name="grp" reporter:datatype="link"/>
3137                 </fields>
3138                 <links>
3139                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3140                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3141                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3142                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3143                 </links>
3144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3145                         <actions>
3146                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3147                                 <retrieve/>
3148                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3149                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3150                         </actions>
3151                 </permacrud>
3152         </class>
3153         <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">
3154                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3155                         <field name="id" />
3156                         <field name="name"  reporter:datatype="text"/>
3157                         <field name="org_unit" reporter:datatype="org_unit"/>
3158                         <field name="value"  reporter:datatype="text"/>
3159                 </fields>
3160                 <links>
3161                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3162                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3163                 </links>
3164         </class>
3165         <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">
3166                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3167                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3168                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3169                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3170                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3171                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3172                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3173                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3174                 </fields>
3175                 <links>
3176                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3177                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3178                 </links>
3179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3180             <actions>
3181                 <create permission="CREATE_COPY_NOTE">
3182                     <context link="owning_copy" field="circ_lib"/>
3183                 </create>
3184                 <retrieve permission="VIEW_COPY_NOTES">
3185                     <context link="owning_copy" field="circ_lib"/>
3186                 </retrieve>
3187                 <update permission="UPDATE_COPY_NOTE">
3188                     <context link="owning_copy" field="circ_lib"/>
3189                 </update>
3190                 <delete permission="DELETE_COPY_NOTE">
3191                     <context link="owning_copy" field="circ_lib"/>
3192                 </delete>
3193             </actions>
3194         </permacrud>
3195         </class>
3196         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3198                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3199                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3200                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3201                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3202                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3203                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3204                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3205                 </fields>
3206                 <links>
3207                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3208                 </links>
3209         </class>
3210         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3211                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3212                         <field name="fingerprint"  reporter:datatype="text"/>
3213                         <field name="id" reporter:datatype="id" />
3214                         <field name="master_record" reporter:datatype="link"/>
3215                         <field name="mods"  reporter:datatype="text"/>
3216                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3217                 </fields>
3218                 <links>
3219                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3220                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3221                 </links>
3222         </class>
3223         <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">
3224                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3225                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3226                         <field name="name"  reporter:datatype="text"/>
3227                 </fields>
3228                 <links/>
3229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3230             <actions>
3231                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3232                 <retrieve/>
3233                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3234                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3235             </actions>
3236         </permacrud>
3237         </class>
3238         <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">
3239                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3240                         <field name="code"  reporter:datatype="text"/>
3241                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3242                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3243                 </fields>
3244                 <links/>
3245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3246             <actions>
3247                 <create permission="CREATE_PERM" global_required="true"/>
3248                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3249                 <update permission="UPDATE_PERM" global_required="true"/>
3250                 <delete permission="DELETE_PERM" global_required="true"/>
3251             </actions>
3252         </permacrud>
3253         </class>
3254         <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">
3255                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3256                         <field name="id" reporter:datatype="id" />
3257                         <field name="metarecord" reporter:datatype="link"/>
3258                         <field name="source" reporter:datatype="link"/>
3259                 </fields>
3260                 <links>
3261                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3262                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3263                 </links>
3264         </class>
3265         <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">
3266                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3267                         <field name="id" reporter:datatype="id" />
3268                         <field name="field" reporter:datatype="link"/>
3269                         <field name="source" reporter:datatype="link"/>
3270                         <field name="value"  reporter:datatype="text"/>
3271                 </fields>
3272                 <links>
3273                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3274                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3275                 </links>
3276         </class>
3277         <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">
3278                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3279                         <field name="id" reporter:datatype="id" />
3280                         <field name="value" reporter:datatype="text"/>
3281                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3282                 </fields>
3283                 <links>
3284                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3285                 </links>
3286         </class>
3287         <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">
3288                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3289                         <field name="id" reporter:datatype="id" />
3290                         <field name="entry" reporter:datatype="link"/>
3291                         <field name="def" reporter:datatype="link"/>
3292                         <field name="source" reporter:datatype="link"/>
3293                 </fields>
3294                 <links>
3295                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3296                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3297                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3298                 </links>
3299         </class>
3300         <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">
3301                 <oils_persist:source_definition>
3302                         SELECT * FROM metabib.author_field_entry
3303                                                 UNION ALL
3304                         SELECT * FROM metabib.keyword_field_entry
3305                                                 UNION ALL
3306                         SELECT * FROM metabib.identifier_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.title_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.subject_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.series_field_entry
3313                 </oils_persist:source_definition>
3314                 <fields>
3315                         <field name="field" reporter:datatype="link"/>
3316                         <field name="id" reporter:datatype="id" />
3317                         <field name="source" reporter:datatype="link"/>
3318                         <field name="value"  reporter:datatype="text"/>
3319                 </fields>
3320                 <links>
3321                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3322                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3323                 </links>
3324         </class>
3325         <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">
3326                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3327                         <field name="field" reporter:datatype="link"/>
3328                         <field name="id" reporter:datatype="id" />
3329                         <field name="source" reporter:datatype="link"/>
3330                         <field name="value"  reporter:datatype="text"/>
3331                 </fields>
3332                 <links>
3333                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3334                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3335                 </links>
3336         </class>
3337         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3338                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3339                         <field name="accepting_usr" reporter:datatype="link"/>
3340                         <field name="amount" reporter:datatype="money" />
3341                         <field name="amount_collected" reporter:datatype="money" />
3342                         <field name="cash_drawer" reporter:datatype="link"/>
3343                         <field name="id" reporter:datatype="id" />
3344                         <field name="note"  reporter:datatype="text"/>
3345                         <field name="payment_ts" reporter:datatype="timestamp"/>
3346                         <field name="xact" reporter:datatype="link"/>
3347                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3348                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3349                 </fields>
3350                 <links>
3351                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3352                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3353                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3354                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3355                 </links>
3356         </class>
3357         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3359                         <field name="accepting_usr" reporter:datatype="link"/>
3360                         <field name="amount" reporter:datatype="money" />
3361                         <field name="amount_collected" reporter:datatype="money" />
3362                         <field name="id" reporter:datatype="id" />
3363                         <field name="note"  reporter:datatype="text"/>
3364                         <field name="payment_ts" reporter:datatype="timestamp"/>
3365                         <field name="xact" reporter:datatype="link"/>
3366                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3367                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3368                 </fields>
3369                 <links>
3370                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3371                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3372                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3373                 </links>
3374         </class>
3375         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3376                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3377                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3378                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3379                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3380                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3381                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3384                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3386                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3388                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3390                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3392                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3394                 </fields>
3395                 <links>
3396                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3397                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3398                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3399                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3400                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3401                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3402                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3403                 </links>
3404         </class>
3405
3406         <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">
3407                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3408                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3409                         <field name="name"  reporter:datatype="text"/>
3410                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3411                         <field name="block_list" reporter:datatype="text"/>
3412                         <field name="staff_alert" reporter:datatype="bool"/>
3413                         <field name="org_depth" reporter:datatype="int"/>
3414                 </fields>
3415                 <links/>
3416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3417             <actions>
3418                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3419                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3420                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3421                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3422             </actions>
3423         </permacrud>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3427                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3428                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3429                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3430                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3431                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3432                 </fields>
3433                 <links>
3434                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3435                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3436                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3437         </links>
3438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3439             <actions>
3440                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3441                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3442                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3443                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3444             </actions>
3445         </permacrud>
3446         </class>
3447         <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">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3449                         <field name="holdable" reporter:datatype="bool"/>
3450                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3451                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3452                         <field name="opac_visible" reporter:datatype="bool"/>
3453             <field name="copy_active" reporter:datatype="bool"/>
3454             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3455                 </fields>
3456                 <links/>
3457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3458             <actions>
3459                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3460                 <retrieve/>
3461                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3462                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3463             </actions>
3464         </permacrud>
3465         </class>
3466         <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">
3467                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3468                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3469                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3470                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3471                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3472                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3473                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3474                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3475                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3476                 </fields>
3477                 <links>
3478                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3479                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3480                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3481                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3482                 </links>
3483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484                         <actions>
3485                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3486                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3487                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3488                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3489                         </actions>
3490                 </permacrud>
3491         </class>
3492         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3494                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3495                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3496                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3497                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3498                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3499                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3500                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3501                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3502                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3503                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3504                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3505                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3506                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3507                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3508                 </fields>
3509                 <links>
3510                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3511                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3512                 </links>
3513         </class>
3514         <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">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3516                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3517                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3518                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3519                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3520                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3521                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3522                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3523                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3524                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3525                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3526                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3527                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3528                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3529                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3530                 </fields>
3531                 <links>
3532                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3533                 </links>
3534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3535                         <actions>
3536                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3537                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3538                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3539                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3540                         </actions>
3541                 </permacrud>
3542         </class>
3543
3544
3545         <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">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3547                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3548                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3549                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3550                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3551                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3552                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3553                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3554                 </fields>
3555                 <links>
3556                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3557                 </links>
3558         </class>
3559
3560         <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">
3561                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3562                         <field name="call_number" />
3563                         <field name="create_date" reporter:datatype="timestamp"/>
3564                         <field name="creator" reporter:datatype="link"/>
3565                         <field name="id" reporter:datatype="id" />
3566                         <field name="pub" reporter:datatype="bool"/>
3567                         <field name="title"  reporter:datatype="text"/>
3568                         <field name="value"  reporter:datatype="text"/>
3569                 </fields>
3570                 <links>
3571                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3572                 </links>
3573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3574             <actions>
3575                 <create permission="CREATE_VOLUME_NOTE">
3576                     <context link="call_number" field="owning_lib"/>
3577                 </create>
3578                 <retrieve permission="VIEW_VOLUME_NOTES">
3579                     <context link="call_number" field="owning_lib"/>
3580                 </retrieve>
3581                 <update permission="UPDATE_VOLUME_NOTE">
3582                     <context link="call_number" field="owning_lib"/>
3583                 </update>
3584                 <delete permission="DELETE_VOLUME_NOTE">
3585                     <context link="call_number" field="owning_lib"/>
3586                 </delete>
3587             </actions>
3588         </permacrud>
3589         </class>
3590         <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">
3591                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3592                         <field name="create_date" reporter:datatype="timestamp"/>
3593                         <field name="creator" reporter:datatype="link"/>
3594                         <field name="edit_date" reporter:datatype="timestamp"/>
3595                         <field name="editor" reporter:datatype="link"/>
3596                         <field name="id" reporter:datatype="id" />
3597                         <field name="record" reporter:datatype="link"/>
3598                         <field name="value" reporter:datatype="text"/>
3599                 </fields>
3600                 <links>
3601                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3602                 </links>
3603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3604             <actions>
3605                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3606                 <retrieve/>
3607                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3608                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3609             </actions>
3610         </permacrud>
3611         </class>
3612         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3613         <oils_persist:source_definition>
3614 SELECT  usr,
3615         SUM(
3616             CASE
3617                 WHEN (
3618                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3619                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3620                 ) THEN 1
3621                 ELSE 0
3622             END
3623         ) AS out,
3624
3625         SUM(
3626             CASE
3627                 WHEN (
3628                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3629                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3630                 ) THEN 1
3631                 ELSE 0
3632             END
3633         ) AS overdue,
3634
3635         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3636         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3637         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3638   FROM  action.circulation
3639   WHERE checkin_time IS NULL
3640   GROUP BY 1
3641         </oils_persist:source_definition>
3642         <fields oils_persist:primary="usr">
3643             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3644             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3645             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3646             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3647             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3648             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3649         </fields>
3650         <links>
3651             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3652         </links>
3653         </class>
3654         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3655         <oils_persist:source_definition>
3656 SELECT  usr,
3657         ARRAY_TO_STRING(ARRAY_ACCUM(
3658             CASE
3659                 WHEN (
3660                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3661                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3662                 ) THEN id
3663                 ELSE 0
3664             END
3665         ),',') AS out,
3666
3667         ARRAY_TO_STRING(ARRAY_ACCUM(
3668             CASE
3669                 WHEN (
3670                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3671                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3672                 ) THEN id
3673                 ELSE 0
3674             END
3675         ),',') AS overdue,
3676
3677         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3678         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3679         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3680   FROM  action.circulation
3681   WHERE checkin_time IS NULL
3682   GROUP BY 1
3683         </oils_persist:source_definition>
3684         <fields oils_persist:primary="usr">
3685             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3686             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3687             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3688             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3689             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3690             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3691         </fields>
3692         <links>
3693             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3694         </links>
3695         </class>
3696         <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">
3697                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3698                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3699                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3700                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3701                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3702                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3703                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3704                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3705                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3706                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3707                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3708                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3709                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3710                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3711                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3712                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3713                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3714                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3715                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3716                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3717                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3718                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3719                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3720                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3721                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3722                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3723                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3724                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3725                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3726                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3727                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3728                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3729                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3730                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3732                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3733                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3734                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3735                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3736                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3737                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3738                 </fields>
3739                 <links>
3740                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3741                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3742                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3743                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3744                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3745                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3746                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3747                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3748                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3749                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3750                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3751                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3752                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3753                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3754                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3755                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3756                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3757                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3758                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3759                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3760                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3761                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3762                 </links>
3763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764                         <actions>
3765                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3766                         </actions>
3767                 </permacrud>
3768         </class>
3769         <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">
3770                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3771                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3772                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3773                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3774                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3775                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3776                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3777                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3778                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3779                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3780                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3781                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3782                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3783                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3784                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3785                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3786                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3787                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3788                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3789                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3790                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3791                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3792                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3793                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3794                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3795                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3796                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3797                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3798                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3799                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3800                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3801                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3802                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3803                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3804                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3805                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3806                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3807                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3808                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3809                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3810                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3811                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3812                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3813                 </fields>
3814                 <links>
3815                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3816                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3817                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3818                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3819                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3820                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3821                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3822                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3823                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3824                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3825                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3826                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3827                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3828                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3829                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3830                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3831                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3832                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3833                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3834                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3835                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3836                 </links>
3837         </class>
3838         <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">
3839                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3840                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3841                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3842                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3843                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3844                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3845                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3846                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3848                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3849                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3850                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3851                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3852                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3853                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3854                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3855                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3856                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3857                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3858                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3859                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3860                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3861                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3862                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3863                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3864                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3865                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3866                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3867                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3868                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3869                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3870                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3872                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3874                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3875                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3876                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3877                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3878                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3879                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3880                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3881                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3882                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3883                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3884                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3885                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3886                 </fields>
3887                 <links>
3888                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3889                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3890                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3891                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3892                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3893                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3894                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3895                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3896                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3897                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3898                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3899                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3900                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3901                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3902                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3903                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3904                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3905                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3906                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3907                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3908                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3909                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3910                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3911                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3912                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3913                 </links>
3914         </class>
3915
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3918                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3919                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3920                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3921                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3922                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3923                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3924                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3925                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3926                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3927                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3928                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3931                 </fields>
3932                 <links>
3933                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3934                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3935                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3936                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3937                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3938                 </links>
3939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3940                         <actions>
3941                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3942                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3943                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3944                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3945                         </actions>
3946                 </permacrud>
3947         </class>
3948
3949         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3950                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3951                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3952                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3953                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3954                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3955                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3956                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3957                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3958                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3959                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3960                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3961                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3962                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3963                 </fields>
3964                 <links>
3965                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3966                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3967                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3968                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3969                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3970                 </links>
3971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3972                         <actions>
3973                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3974                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3975                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3976                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3977                         </actions>
3978                 </permacrud>
3979         </class>
3980         
3981         <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">
3982                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3983                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3984                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3985                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3986                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3987                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3988                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3989                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3990                 </fields>
3991                 <links>
3992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3993                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3994                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3995                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3996                 </links>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4000                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4001                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4002                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4003                         </actions>
4004                 </permacrud>
4005         </class>
4006         
4007         <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">
4008                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4009                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4010                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4011                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4012                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4013                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4014                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4015                 </fields>
4016                 <links>
4017                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4018                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4019                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4020                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4025                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4026                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4027                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4028                         </actions>
4029                 </permacrud>
4030         </class>
4031         
4032         <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">
4033                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4034                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4035                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4036                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4037                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4038                 </fields>
4039                 <links>
4040                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4041                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4042                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4043                 </links>
4044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4045                         <actions>
4046                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4047                     <context link="resource" field="owner" />
4048                 </create>
4049                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4050                     <context link="resource" field="owner" />
4051                 </retrieve>
4052                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4053                     <context link="resource" field="owner" />
4054                 </update>
4055                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4056                     <context link="resource" field="owner" />
4057                 </delete>
4058                         </actions>
4059                 </permacrud>
4060         </class>
4061         
4062         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4063                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4064                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4065                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4066                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4067                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4068                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4069                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4070                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4071                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4072                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4073                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4075                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4076                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4077                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4082                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4083                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4084                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4085                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4086                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4087                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4088                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4089                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4090                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4091                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4092                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4093                 </fields>
4094                 <links>
4095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4098                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4099                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4100                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4101                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4102                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4103                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4104                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4105                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4106                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4107                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4108                 </links>
4109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4110                         <actions>
4111                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4112                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4113                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4114                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4115                         </actions>
4116                 </permacrud>
4117         </class>
4118         
4119         <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">
4120                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4121                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4122                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4123                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4124                 </fields>
4125                 <links>
4126                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4127                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4128                 </links>
4129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4130                         <actions>
4131                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4132                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4133                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4134                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4135                         </actions>
4136                 </permacrud>
4137         </class>
4138
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4141                         <field name="bucket" reporter:datatype="link"/>
4142                         <field name="id" reporter:datatype="id" />
4143                         <field name="target_call_number" reporter:datatype="link" />
4144                         <field name="create_time" reporter:datatype="timestamp" />
4145                         <field name="pos" reporter:datatype="int" />
4146                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4147                 </fields>
4148                 <links>
4149                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4150                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4151             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4152                 </links>
4153         </class>
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4156                         <field name="id" reporter:datatype="id" />
4157                         <field name="item" reporter:datatype="link"/>
4158                         <field name="note" reporter:datatype="text" />
4159                 </fields>
4160                 <links>
4161                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4162                 </links>
4163         </class>
4164         <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">
4165                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4166                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4167                         <field name="btype" reporter:datatype="text"/>
4168                         <field name="id" reporter:datatype="id" />
4169                         <field name="name" reporter:datatype="text"/>
4170                         <field name="description" reporter:datatype="text"/>
4171                         <field name="owner" reporter:datatype="link"/>
4172                         <field name="pub" reporter:datatype="bool"/>
4173                         <field name="create_time" reporter:datatype="timestamp" />
4174                 </fields>
4175                 <links>
4176                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4177                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4178                 </links>
4179         </class>
4180         <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">
4181                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4182                         <field name="id" reporter:datatype="id" />
4183                         <field name="bucket" reporter:datatype="link"/>
4184                         <field name="note" reporter:datatype="text" />
4185                 </fields>
4186                 <links>
4187                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4188                 </links>
4189         </class>
4190         <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">
4191                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4192                         <field name="hold" reporter:datatype="link"/>
4193                         <field name="id" reporter:datatype="id" />
4194                         <field name="target_copy" reporter:datatype="link"/>
4195                         <field name="proximity" reporter:datatype="number"/>
4196                 </fields>
4197                 <links>
4198                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4199                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4200                 </links>
4201         </class>
4202         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4203                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4204                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4205                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4206                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4207                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4208                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4209                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4210                 </fields>
4211                 <links>
4212                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4213                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4214                 </links>
4215         </class>
4216         <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">
4217                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4218                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4219                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4220                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4221                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4222                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4223                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4224                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4225                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4226                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4227                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4228                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4229                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4230                 </fields>
4231                 <links>
4232                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4233                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4234                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4235                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4236                 </links>
4237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4238             <actions>
4239                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4240                 <retrieve/>
4241                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4242                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4243             </actions>
4244         </permacrud>
4245         </class>
4246         <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">
4247                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4248                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4249                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4250                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4251                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4252             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4253             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4254             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4255                 </fields>
4256                 <links>
4257                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4258                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4259                 </links>
4260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4261             <actions>
4262                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4263                 <retrieve/>
4264                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4265                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4266             </actions>
4267         </permacrud>
4268         </class>
4269         <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">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4271                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4272             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4273             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4274                 </fields>
4275                 <links>
4276                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4277                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4278                 </links>
4279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4280             <actions>
4281                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4282                                         <context link="lgroup" field="owner" />
4283                 </create>
4284                 <retrieve/>
4285                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4286                                         <context link="lgroup" field="owner" />
4287                 </update>
4288                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4289                                         <context link="lgroup" field="owner" />
4290                 </delete>
4291             </actions>
4292         </permacrud>
4293         </class>
4294
4295     <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">
4296         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4297             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4298             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4299             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4300             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4301         </fields>
4302         <links>
4303             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4304             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4305         </links>
4306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4307             <actions>
4308                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4309                 <retrieve/>
4310                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4311                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4312             </actions>
4313         </permacrud>
4314     </class>
4315
4316         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4317                 <fields>
4318                         <field name="sre_id" oils_persist:virtual="true" />
4319                         <field name="location" oils_persist:virtual="true" />
4320                         <field name="owning_lib" oils_persist:virtual="true" />
4321                         <field name="basic_holdings" oils_persist:virtual="true" />
4322                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4323                         <field name="supplement_holdings" oils_persist:virtual="true" />
4324                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4325                         <field name="index_holdings" oils_persist:virtual="true" />
4326                         <field name="index_holdings_add" oils_persist:virtual="true" />
4327                         <field name="online" oils_persist:virtual="true" />
4328                         <field name="missing" oils_persist:virtual="true" />
4329                         <field name="incomplete" oils_persist:virtual="true" />
4330                 </fields>
4331         </class>
4332
4333         <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">
4334                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4335                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4336                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4337                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4338                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4339                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4340                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4342                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4343                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4344                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4345                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4346                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4347                 </fields>
4348                 <links>
4349                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4350                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4351                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4352                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4353                 </links>
4354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4355                         <actions>
4356                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4357                                 <retrieve/>
4358                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4359                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4360                         </actions>
4361                 </permacrud>
4362         </class>
4363
4364         <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">
4365                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4366                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4367                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4368                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4369                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4370                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4371                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4373                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4374                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4375                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4376                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4377                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4380                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4381                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4382                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4383                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4385                 </fields>
4386                 <links>
4387                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4388                 </links>
4389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4390                         <actions>
4391                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4392                                         <context link="subscription" field="owning_lib" />
4393                                 </create>
4394                                 <retrieve />
4395                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4396                                         <context link="subscription" field="owning_lib" />
4397                                 </update>
4398                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4399                                         <context link="subscription" field="owning_lib" />
4400                                 </delete>
4401                         </actions>
4402                 </permacrud>
4403         </class>
4404
4405         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4406                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4407                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4408                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4409                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4410                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4411                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4412                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4413                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4414                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4415                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4417                 </fields>
4418                 <links>
4419                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4420                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4421                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4422                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4423                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4424                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4425                 </links>
4426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4427                         <actions>
4428                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4429                                 <retrieve />
4430                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4431                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4432                         </actions>
4433                 </permacrud>
4434         </class>
4435
4436         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4439                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4440                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4441                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4442                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4443                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4444                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4445                 </fields>
4446                 <links>
4447                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4448                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4449                 </links>
4450         </class>
4451
4452         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4453                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4454                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4455                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4456                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4457                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4458                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4459                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4460                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4461                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4462                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4463                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4464                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4465                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4466                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4467                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4468                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4469                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4470                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4472                 </fields>
4473                 <links>
4474                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4475                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4476                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4477                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4478                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4479                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4480                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4481                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4482                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4483                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4484                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4485                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4486                 </links>
4487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4488                         <actions>
4489                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4490                                 <retrieve />
4491                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4492                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4493                         </actions>
4494                 </permacrud>
4495         </class>
4496
4497         <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">
4498                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4499                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4500                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4501                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4502                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4503                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4504                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4505                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4506                 </fields>
4507                 <links>
4508                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4509                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4510                 </links>
4511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4512                         <actions>
4513                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4514                                         <context link="distribution" field="holding_lib" />
4515                                 </create>
4516                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4517                                         <context link="distribution" field="holding_lib" />
4518                                 </retrieve>
4519                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4520                                         <context link="distribution" field="holding_lib" />
4521                                 </update>
4522                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4523                                         <context link="distribution" field="holding_lib" />
4524                                 </delete>
4525                         </actions>
4526                 </permacrud>
4527         </class>
4528
4529         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4530                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4531                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4532                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4533                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4534                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4535                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4536                 </fields>
4537                 <links>
4538                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4539                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4540                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4541                 </links>
4542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4543                         <actions>
4544                                 <create permission="ADMIN_SERIAL_STREAM">
4545                                         <context link="distribution" field="holding_lib" />
4546                                 </create>
4547                                 <retrieve />
4548                                 <update permission="ADMIN_SERIAL_STREAM">
4549                                         <context link="distribution" field="holding_lib" />
4550                                 </update>
4551                                 <delete permission="ADMIN_SERIAL_STREAM">
4552                                         <context link="distribution" field="holding_lib" />
4553                                 </delete>
4554                         </actions>
4555                 </permacrud>
4556         </class>
4557
4558         <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">
4559                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4561                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4562                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4563                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4564                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4565                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4566                 </fields>
4567                 <links>
4568                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4569                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4570                 </links>
4571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4572                         <actions>
4573                                 <create permission="ADMIN_SERIAL_STREAM">
4574                                         <context link="stream" jump="distribution" field="holding_lib" />
4575                                 </create>
4576                                 <retrieve permission="RECEIVE_SERIAL">
4577                                         <context link="stream" jump="distribution" field="holding_lib" />
4578                                 </retrieve>
4579                                 <update permission="ADMIN_SERIAL_STREAM">
4580                                         <context link="stream" jump="distribution" field="holding_lib" />
4581                                 </update>
4582                                 <delete permission="ADMIN_SERIAL_STREAM">
4583                                         <context link="stream" jump="distribution" field="holding_lib" />
4584                                 </delete>
4585                         </actions>
4586                 </permacrud>
4587         </class>
4588
4589         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4590                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4591                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4592                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4593                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4594                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4595                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4596                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4597                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4599                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4600                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4601                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4602                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4603                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4604                 </fields>
4605                 <links>
4606                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4607                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4608                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4609                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4610                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4611                 </links>
4612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4613                         <actions>
4614                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4615                                         <context link="subscription" field="owning_lib" />
4616                                 </create>
4617                                 <retrieve/>
4618                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4619                                         <context link="subscription" field="owning_lib" />
4620                                 </update>
4621                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4622                                         <context link="subscription" field="owning_lib" />
4623                                 </delete>
4624                         </actions>
4625                 </permacrud>
4626         </class>
4627
4628         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4629                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4630                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4631                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4632                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4633                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4634                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4635                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4636                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4637                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4638                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4639                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4640                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4641                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4642                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4643                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4644                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4645                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4646                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4647                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4648                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4649                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4650                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4651                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4652                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4653                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4654                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4655                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4656                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4657                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4658                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4659                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4660                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4661                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4662                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4663                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4664                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4665                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4666                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4668                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4670                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4672                 </fields>
4673                 <links>
4674                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4675                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4676                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4677                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4678                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4679                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4680                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4681                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4682                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4683                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4684                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4685                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4686                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4687                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4688                 </links>
4689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4690                         <actions>
4691                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4692                                 <retrieve/>
4693                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4694                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4695                         </actions>
4696                 </permacrud>
4697         </class>
4698
4699         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4700                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4701                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4702                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4703                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4704                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4705                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4706                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4707                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4708                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4709                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4710                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4711                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4712                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4713                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4714                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4715                 </fields>
4716                 <links>
4717                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4718                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4720                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4721                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4722                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4723                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4724                 </links>
4725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4726                         <actions>
4727                                 <create permission="ADMIN_SERIAL_ITEM">
4728                                         <context link="stream" jump="distribution" field="holding_lib" />
4729                                 </create>
4730                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4731                                         <context link="stream" jump="distribution" field="holding_lib" />
4732                                 </retrieve>
4733                                 <update permission="ADMIN_SERIAL_ITEM">
4734                                         <context link="stream" jump="distribution" field="holding_lib" />
4735                                 </update>
4736                                 <delete permission="ADMIN_SERIAL_ITEM">
4737                                         <context link="stream" jump="distribution" field="holding_lib" />
4738                                 </delete>
4739                         </actions>
4740                 </permacrud>
4741         </class>
4742
4743         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4744                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4746                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4747                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4748                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4749                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4750                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4751                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4752                 </fields>
4753                 <links>
4754                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4755                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4756                 </links>
4757                 <!-- Not available via PCRUD at this time -->
4758         </class>
4759         <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">
4760                 <fields>
4761                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4762                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4763                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4764                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4765                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4766                 </fields>
4767                 <links>
4768                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4769                 </links>
4770         </class>
4771         <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">
4772                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4773                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4774                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4775                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4776                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4777                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4778                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4779                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4780                 </fields>
4781                 <links>
4782                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4783                 </links>
4784         </class>
4785         <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">
4786                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4787                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4788                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4789                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4790                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4791                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4792                 </fields>
4793                 <links>
4794                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4795                 </links>
4796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4797                         <actions>
4798                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4799                                         <context link="distribution" field="holding_lib" />
4800                                 </create>
4801                                 <retrieve/>
4802                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4803                                         <context link="distribution" field="holding_lib" />
4804                                 </update>
4805                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4806                                         <context link="distribution" field="holding_lib" />
4807                                 </delete>
4808                         </actions>
4809                 </permacrud>
4810         </class>
4811
4812         <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">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4814                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4815                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4816                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4817                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4818                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4819                 </fields>
4820                 <links>
4821                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4822                 </links>
4823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4824                         <actions>
4825                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4826                                         <context link="distribution" field="holding_lib" />
4827                                 </create>
4828                                 <retrieve/>
4829                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4830                                         <context link="distribution" field="holding_lib" />
4831                                 </update>
4832                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4833                                         <context link="distribution" field="holding_lib" />
4834                                 </delete>
4835                         </actions>
4836                 </permacrud>
4837         </class>
4838
4839         <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">
4840                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4841                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4842                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4843                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4844                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4845                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4846                 </fields>
4847                 <links>
4848                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4849                 </links>
4850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4851                         <actions>
4852                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4853                                         <context link="distribution" field="holding_lib" />
4854                                 </create>
4855                                 <retrieve/>
4856                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4857                                         <context link="distribution" field="holding_lib" />
4858                                 </update>
4859                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4860                                         <context link="distribution" field="holding_lib" />
4861                                 </delete>
4862                         </actions>
4863                 </permacrud>
4864         </class>
4865
4866         <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">
4867                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4868                         <field name="id" reporter:datatype="id" />
4869                         <field name="owning_copy" reporter:datatype="link"/>
4870                         <field name="stat_cat" reporter:datatype="link"/>
4871                         <field name="stat_cat_entry" reporter:datatype="link"/>
4872                 </fields>
4873                 <links>
4874                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4875                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4876                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4877                 </links>
4878         </class>
4879         <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">
4880                 <fields oils_persist:primary="code">
4881                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4882                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4883                 </fields>
4884                 <links/>
4885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4886             <actions>
4887                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4888                 <retrieve/>
4889                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4890                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4891             </actions>
4892         </permacrud>
4893         </class>
4894         <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">
4895                 <fields oils_persist:primary="code">
4896                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4897                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4898                 </fields>
4899                 <links/>
4900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4901             <actions>
4902                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4903                 <retrieve/>
4904                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4905                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4906             </actions>
4907         </permacrud>
4908         </class>
4909         <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">
4910                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4911                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4912                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4913                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4914                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4915                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4916                 </fields>
4917                 <links>
4918             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4919         </links>
4920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4921             <actions>
4922                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4923                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4924                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4925                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4926             </actions>
4927         </permacrud>
4928         </class>
4929         <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">
4930                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4931                         <field name="id" reporter:datatype="id" />
4932                         <field name="name" reporter:datatype="text"/>
4933                 </fields>
4934                 <links/>
4935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4936             <actions>
4937                 <create permission="CREATE_LASSO" global_required="true"/>
4938                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4939                 <update permission="UPDATE_LASSO" global_required="true"/>
4940                 <delete permission="DELETE_LASSO" global_required="true"/>
4941             </actions>
4942         </permacrud>
4943         </class>
4944         <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">
4945                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4946                         <field name="id" reporter:datatype="id" />
4947                         <field name="lasso" reporter:datatype="link"/>
4948                         <field name="org_unit" reporter:datatype="org_unit"/>
4949                 </fields>
4950                 <links>
4951                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4952                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4953                 </links>
4954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4955             <actions>
4956                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4957                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4958                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4959                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4960             </actions>
4961         </permacrud>
4962         </class>
4963         <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">
4964                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4965                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4966                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4967                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4968                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4969                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4970                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4971                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4972                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4973                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4974                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4975                 </fields>
4976                 <links>
4977                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4978                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4979                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4980                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4982                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4983                 </links>
4984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4985             <actions>
4986                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4987                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4988                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4989                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4990             </actions>
4991         </permacrud>
4992         </class>
4993         <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">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4995                         <field name="id" reporter:datatype="id" />
4996                         <field name="from_org" reporter:datatype="org_unit"/>
4997                         <field name="to_org" reporter:datatype="org_unit"/>
4998                         <field name="prox" reporter:datatype="int" />
4999                 </fields>
5000                 <links>
5001                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5002                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5003                 </links>
5004         </class>
5005         <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">
5006                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5007                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5008                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5009                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5010                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5011                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5012                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5013                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5014                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5015                 </fields>
5016                 <links/>
5017         </class>
5018         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5019                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5020                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5021                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5022                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5023                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5024                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5025                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5026                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5027                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5028                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5029                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5030                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5032                 </fields>
5033                 <links>
5034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5035                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5036                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5037                 </links>
5038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5039             <actions>
5040                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5041                 <retrieve/>
5042                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5043                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5044             </actions>
5045         </permacrud>
5046         </class>
5047         <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">
5048                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5049                         <field name="address_type"  reporter:datatype="text"/>
5050                         <field name="city"  reporter:datatype="text"/>
5051                         <field name="country"  reporter:datatype="text"/>
5052                         <field name="county"  reporter:datatype="text"/>
5053                         <field name="id" reporter:datatype="id" />
5054                         <field name="org_unit" reporter:datatype="org_unit"/>
5055                         <field name="post_code"  reporter:datatype="text"/>
5056                         <field name="state"  reporter:datatype="text"/>
5057                         <field name="street1"  reporter:datatype="text"/>
5058                         <field name="street2"  reporter:datatype="text"/>
5059                         <field name="valid" reporter:datatype="bool"/>
5060                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5061                 </fields>
5062                 <links>
5063                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5064                 </links>
5065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5066             <actions>
5067                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5068                 <retrieve/>
5069                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5070                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5071             </actions>
5072         </permacrud>
5073         </class>
5074         <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">
5075                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5076                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5077                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5078                         <field name="query_text" reporter:datatype="text"/>
5079                 </fields>
5080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5081             <actions>
5082                 <retrieve/>
5083             </actions>
5084         </permacrud>
5085         </class>
5086
5087         <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">
5088                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5089                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5090                         <field name="owner" reporter:datatype="org_unit"/>
5091                         <field name="code" reporter:datatype="text"/>
5092                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5093                         <field name="create_date" reporter:datatype="timestamp"/>
5094                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5095                 </fields>
5096                 <links>
5097                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5098                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5099                 </links>
5100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101             <actions>
5102                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5103                 <retrieve/>
5104                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5105                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5106             </actions>
5107         </permacrud>
5108         </class>
5109         <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">
5110                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5111                         <field name="id" reporter:datatype="id"/>
5112                         <field name="grp" reporter:datatype="link"/>
5113                         <field name="pos" reporter:datatype="int"/>
5114                         <field name="query" reporter:datatype="link"/>
5115                 </fields>
5116                 <links>
5117                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5118                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5119                 </links>
5120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5121             <actions>
5122                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5123                     <context link="grp" field="owner"/>
5124                 </create>
5125                 <retrieve/>
5126                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5127                     <context link="grp" field="owner"/>
5128                 </update>
5129                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5130                     <context link="grp" field="owner"/>
5131                 </delete>
5132             </actions>
5133         </permacrud>
5134         </class>
5135
5136         <!-- A note: Please update alhr and ahopl when updating ahr -->
5137         <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">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5139                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5140                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5141                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5142                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5143                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5144                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5146                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5147                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5149                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5150                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5151                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5152                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5153                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5154                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5155                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5159                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5160                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5161                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5162                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5163                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5164                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5166                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5167                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5168                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5170                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5171                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5173                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5174                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5175                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5176                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5177                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5178                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5179                 </fields>
5180                 <links>
5181                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5182                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5183                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5184                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5186                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5187                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5189                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5190                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5191                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5192                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5193                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5194                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5195                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5196                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5197                 </links>
5198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199                         <actions>
5200                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5201                         </actions>
5202                 </permacrud>
5203         </class>
5204         <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">
5205                 <oils_persist:source_definition><![CDATA[
5206                 SELECT
5207                         ahr.*,
5208                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5209                                 copy_location_order_position,
5210                         CASE WHEN au.alias IS NOT NULL THEN
5211                                 au.alias
5212                         ELSE
5213                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5214                                         COALESCE(au.family_name, ''),
5215                                         COALESCE(au.suffix, ''),
5216                                         ', ',
5217                                         COALESCE(au.prefix, ''),
5218                                         COALESCE(au.first_given_name, ''),
5219                                         COALESCE(au.second_given_name, '')
5220                                 ], ' '), E'\\s+,', ',')
5221                         END AS usr_display_name,
5222                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5223                                 AS call_number_label,
5224                         siss.label AS issuance_label,
5225                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5226                         ahcm_1.copy_count AS potential_copies
5227                 FROM action.hold_request ahr
5228                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5229                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5230                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5231                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5232                 JOIN actor.usr au ON (au.id = ahr.usr)
5233                 JOIN (
5234                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5235                         FROM asset.copy_location
5236                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5237                 LEFT JOIN actor.usr_standing_penalty ausp 
5238                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5239                 LEFT JOIN config.standing_penalty csp
5240                         ON (
5241                                 csp.id = ausp.standing_penalty AND 
5242                                 csp.block_list LIKE '%CAPTURE%' AND (
5243                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5244                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5245                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5246                                         )
5247                                 )
5248                         )
5249                 JOIN (
5250                         SELECT COUNT(target_copy) AS copy_count, hold
5251                         FROM action.hold_copy_map
5252                         GROUP BY 2
5253                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5254                 LEFT JOIN serial.issuance siss
5255                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5256                 LEFT JOIN asset.copy_location_order acplo
5257                         ON (acp.location = acplo.location AND
5258                                 acp.circ_lib = acplo.org)
5259                 WHERE
5260                         ahr.capture_time IS NULL AND
5261                         ahr.cancel_time IS NULL AND
5262                         csp.id IS NULL AND
5263                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5264                 ]]></oils_persist:source_definition>
5265                 <fields oils_persist:primary="id">
5266                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5267                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5268                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5269                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5270                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5271                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5272                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5273                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5274                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5275                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5276                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5277                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5278                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5279                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5280                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5281                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5282                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5283                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5284                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5286                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5287                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5288                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5289                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5290                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5291                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5292                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5293                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5294                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5295                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5296                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5297                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5298                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5300                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5301                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5302                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5303                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5304                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5305                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5306                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5307                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5308                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5309                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5310                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5311                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5312                 </fields>
5313                 <links>
5314                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5315                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5316                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5317                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5318                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5319                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5320                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5321                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5322                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5323                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5324                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5325                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5326                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5327                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5328                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5329                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5330                 </links>
5331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5332                         <actions>
5333                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5334                         </actions>
5335                 </permacrud>
5336         </class>
5337         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5338                 <oils_persist:source_definition>
5339                         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)
5340                 </oils_persist:source_definition>
5341                 <fields oils_persist:primary="id">
5342                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5343                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5344                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5345                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5346                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5347                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5348                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5349                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5350                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5351                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5352                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5353                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5354                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5355                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5356                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5357                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5358                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5359                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5360                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5361                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5362                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5363                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5364                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5365                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5366                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5367                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5368                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5369                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5370                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5371                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5372                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5373                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5374                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5375                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5376                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5377                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5378                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5379                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5380                 </fields>
5381                 <links>
5382                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5383                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5384                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5385                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5386                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5387                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5388                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5389                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5390                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5391                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5392                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5393                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5394                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5395                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5396                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5397                 </links>
5398         </class>
5399
5400         <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">
5401                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5402                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5403                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5404                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5405                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5406                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5407                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5408                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5409                 </fields>
5410                 <links>
5411                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5412                 </links>
5413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5414                         <actions>
5415                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5416                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5417                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5418                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5419                         </actions>
5420                 </permacrud>
5421         </class>
5422         <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">
5423                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5424                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5425                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5426                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5427                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5428                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5429                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5430                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5431                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5432                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5433                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5434                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5435                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5436                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5437                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5438                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5439                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5440                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5441                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5442                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5443                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5444                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5445                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5446                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5447                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5448                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5449                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5452                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5453                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5454                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5455                 </fields>
5456                 <links>
5457                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5458                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5459                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5460                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5461                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5462                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5463                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5464                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5465                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5466                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5467                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5468                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5469                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5470                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5471                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5472                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5473                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5474                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5475                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5476                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5477                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5478                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5479                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5480                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5481                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5482                 </links>
5483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5484             <actions>
5485                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5486                 <retrieve />
5487                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5488                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5489             </actions>
5490         </permacrud>
5491         </class>
5492         <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">
5493                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5494                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5495                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5496                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5497                 </fields>
5498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5499                         <actions>
5500                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5501                                 <retrieve/>
5502                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5503                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5504                         </actions>
5505                 </permacrud>
5506         </class>
5507         <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">
5508                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5509                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5510                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5511                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5512                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5513                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5514                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5515                 </fields>
5516                 <links>
5517                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5518                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5519                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5520                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5521                 </links>
5522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5523                         <actions>
5524                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5525                                 <retrieve/>
5526                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5527                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5528                         </actions>
5529                 </permacrud>
5530         </class>
5531         <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">
5532                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5533                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field name="btype" reporter:datatype="text"/>
5535                         <field name="id" reporter:datatype="id" />
5536                         <field name="name"  reporter:datatype="text"/>
5537                         <field name="description" reporter:datatype="text"/>
5538                         <field name="owner" reporter:datatype="link"/>
5539                         <field name="pub" reporter:datatype="bool"/>
5540                         <field name="create_time" reporter:datatype="timestamp" />
5541                 </fields>
5542                 <links>
5543                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5544                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5545                 </links>
5546         </class>
5547         <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">
5548                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5549                         <field name="id" reporter:datatype="id" />
5550                         <field name="bucket" reporter:datatype="link"/>
5551                         <field name="note" reporter:datatype="text" />
5552                 </fields>
5553                 <links>
5554                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5555                 </links>
5556         </class>
5557         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5558                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5559                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5560                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5561                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5562                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5563                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5564                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5565                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5566                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5567                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5568                 </fields>
5569                 <links>
5570                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5571                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5572                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5573                 </links>
5574         </class>
5575         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5576                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5577                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5578                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5579                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5580                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5581                 </fields>
5582                 <links>
5583                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5584                 </links>
5585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5586                         <actions>
5587                                 <retrieve permission="VIEW_USER">
5588                                         <context link="usr" field="home_ou" />
5589                                 </retrieve>
5590                         </actions>
5591                 </permacrud>
5592         </class>
5593     <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">
5594         <fields oils_persist:primary="field">
5595             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5596             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5597             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5598         </fields>
5599         <links/>
5600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5601             <actions>
5602                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5603                 <retrieve />
5604                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5605                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5606             </actions>
5607         </permacrud>
5608     </class>
5609         <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">
5610                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5611                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5612                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5613                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5614                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5615                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5616                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5617                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5618                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5619                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5620                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5621                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5622                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5623                 </fields>
5624                 <links>
5625                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5626                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5627                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5628                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5629                 </links>
5630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5631             <actions>
5632                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5633                 <retrieve />
5634                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5635                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5636             </actions>
5637         </permacrud>
5638         </class>
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5641                         <field name="field" reporter:datatype="link"/>
5642                         <field name="id" reporter:datatype="id" />
5643                         <field name="source" reporter:datatype="link"/>
5644                         <field name="value"  reporter:datatype="text"/>
5645                 </fields>
5646                 <links>
5647                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5648                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5649                 </links>
5650         </class>
5651         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5653                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5654                         <field name="btype" reporter:datatype="text"/>
5655                         <field name="id" reporter:datatype="id" />
5656                         <field name="name"  reporter:datatype="text"/>
5657                         <field name="description" reporter:datatype="text"/>
5658                         <field name="owner" reporter:datatype="link"/>
5659                         <field name="pub" reporter:datatype="bool"/>
5660                         <field name="create_time" reporter:datatype="timestamp" />
5661                 </fields>
5662                 <links>
5663                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5664                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5665                 </links>
5666         </class>
5667         <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">
5668                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5669                         <field name="id" reporter:datatype="id" />
5670                         <field name="bucket" reporter:datatype="link"/>
5671                         <field name="note" reporter:datatype="text" />
5672                 </fields>
5673                 <links>
5674                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5675                 </links>
5676         </class>
5677         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5678                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5679                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5680                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5681                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5682                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5683                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5684                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5686                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5687                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5688                 </fields>
5689                 <links>
5690                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5691                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5692                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5693                 </links>
5694         </class>
5695         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5697                         <field name="id" reporter:datatype="id" />
5698                         <field name="ind1" />
5699                         <field name="ind2" />
5700                         <field name="record" />
5701                         <field name="subfield" />
5702                         <field name="tag" />
5703                         <field name="value" />
5704                 </fields>
5705                 <links>
5706                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5707                 </links>
5708         </class>
5709         <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">
5710                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5711                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5712                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5713                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5714                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5715                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5716                 </fields>
5717                 <links>
5718                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5719                 </links>
5720         </class>
5721         <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">
5722                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5723                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5724                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5725                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5726                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5727                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5728                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5729                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5730                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5731                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5732                 </fields>
5733                 <links>
5734                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5735                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5736                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5737                 </links>
5738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739             <actions>
5740                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5741                 <retrieve/>
5742                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5743                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5744             </actions>
5745         </permacrud>
5746         </class>
5747         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5748                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5749                         <field name="create_date" reporter:datatype="timestamp"/>
5750                         <field name="creator" reporter:datatype="link"/>
5751                         <field name="edit_date" reporter:datatype="timestamp"/>
5752                         <field name="editor" reporter:datatype="link"/>
5753                         <field name="id" reporter:datatype="id" />
5754                         <field name="pub" reporter:datatype="bool"/>
5755                         <field name="record" reporter:datatype="link"/>
5756                         <field name="value"  reporter:datatype="text"/>
5757                 </fields>
5758                 <links>
5759                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5760                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5761                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5762                 </links>
5763         </class>
5764         <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">
5765                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5766                         <field name="balance_owed" reporter:datatype="money" />
5767                         <field name="total_owed" reporter:datatype="money" />
5768                         <field name="total_paid" reporter:datatype="money" />
5769                         <field name="usr" reporter:datatype="link"/>
5770                 </fields>
5771                 <links>
5772                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5773                 </links>
5774         </class>
5775         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5776                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5777                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5778                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5779                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5780                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5781                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5782                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5783                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5784                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5785                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5786                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5787                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5788                 </fields>
5789                 <links>
5790                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5791                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5792                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5793                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5794                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5795                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5796                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5797                 </links>
5798         </class>
5799         <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">
5800                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5801                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5802                         <field name="quality" reporter:datatype="int" />
5803                         <field name="source" reporter:datatype="text"/>
5804                         <field name="transcendant" reporter:datatype="bool"/>
5805                         <field name="can_have_copies" reporter:datatype="bool"/>
5806                 </fields>
5807                 <links/>
5808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5809             <actions>
5810                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5811                 <retrieve/>
5812                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5813                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5814             </actions>
5815         </permacrud>
5816         </class>
5817         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5818                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5819                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5820                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5821                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5822                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5823                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5824                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5825                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5826                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5827                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5828                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5829                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5830                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5831                 </fields>
5832                 <links>
5833                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5834                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5835                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5836                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5837                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5838                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5839                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5840                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5841                 </links>
5842         </class>
5843         <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">
5844                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5845                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5846                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5847                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5848                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5849                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5850                 </fields>
5851                 <links>
5852                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5853                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5854                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5855                 </links>
5856         </class>
5857         <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">
5858                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5859                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5860                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5861                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5862                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5863                 </fields>
5864                 <links>
5865                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5866                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5867                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5868                 </links>
5869         </class>
5870         <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">
5871                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5872                         <field name="bucket" reporter:datatype="link"/>
5873                         <field name="id" reporter:datatype="id" />
5874                         <field name="target_user" reporter:datatype="link"/>
5875                         <field name="create_time" reporter:datatype="timestamp" />
5876                         <field name="pos" reporter:datatype="int" />
5877                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5878                 </fields>
5879                 <links>
5880                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5881                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5882             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5883                 </links>
5884         </class>
5885         <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">
5886                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5887                         <field name="id" reporter:datatype="id" />
5888                         <field name="item" reporter:datatype="link"/>
5889                         <field name="note" reporter:datatype="text" />
5890                 </fields>
5891                 <links>
5892                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5893                 </links>
5894         </class>
5895         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5896                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5897                         <field name="balance_owed" reporter:datatype="money" />
5898                         <field name="total_owed" reporter:datatype="money" />
5899                         <field name="total_paid" reporter:datatype="money" />
5900                         <field name="usr" reporter:datatype="link"/>
5901                 </fields>
5902                 <links>
5903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5904                 </links>
5905         </class>
5906         <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">
5907                 <fields oils_persist:primary="code" oils_persist:sequence="">
5908                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5909                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5910                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5911                 </fields>
5912                 <links/>
5913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5914             <actions>
5915                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5916                 <retrieve/>
5917                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5918                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5919             </actions>
5920         </permacrud>
5921         </class>
5922         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5923                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5924                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5925                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5926                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5927                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5928                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5929                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5930                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5931                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5932                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5933                 </fields>
5934                 <links>
5935                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5936                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5937                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5938                 </links>
5939         </class>
5940         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5941                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5942                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5943                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5944                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5945                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5946                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5947                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5948                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5949                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5950                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5951                 </fields>
5952                 <links>
5953                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5954                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5955                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5956                 </links>
5957         </class>
5958         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5959                 <fields oils_persist:primary="id" oils_persist:sequence="">
5960                         <field name="checkin_lib" reporter:datatype="link"/>
5961                         <field name="checkin_staff" reporter:datatype="link"/>
5962                         <field name="checkin_time" reporter:datatype="timestamp"/>
5963                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5964                         <field name="circ_staff" reporter:datatype="link"/>
5965                         <field name="desk_renewal" reporter:datatype="bool"/>
5966                         <field name="due_date" reporter:datatype="timestamp"/>
5967                         <field name="duration" reporter:datatype="interval"/>
5968                         <field name="duration_rule" reporter:datatype="link"/>
5969                         <field name="fine_interval" reporter:datatype="interval"/>
5970                         <field name="id" reporter:datatype="id" />
5971                         <field name="max_fine" reporter:datatype="money" />
5972                         <field name="max_fine_rule" reporter:datatype="link"/>
5973                         <field name="opac_renewal" reporter:datatype="bool"/>
5974                         <field name="phone_renewal" reporter:datatype="bool"/>
5975                         <field name="recurring_fine" reporter:datatype="money" />
5976                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5977                         <field name="renewal_remaining" reporter:datatype="int" />
5978             <field name="grace_period" reporter:datatype="interval" />
5979                         <field name="stop_fines" reporter:datatype="text"/>
5980                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5981                         <field name="target_copy" reporter:datatype="link"/>
5982                         <field name="usr" reporter:datatype="link"/>
5983                         <field name="xact_finish" reporter:datatype="timestamp" />
5984                         <field name="xact_start" reporter:datatype="timestamp" />
5985                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5986                 </fields>
5987                 <links>
5988                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5989                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5990                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5991                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5992                 </links>
5993         </class>
5994         <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">
5995                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5996                         <field name="field" reporter:datatype="link"/>
5997                         <field name="id" reporter:datatype="id" />
5998                         <field name="source" reporter:datatype="link"/>
5999                         <field name="value" reporter:datatype="text"/>
6000                 </fields>
6001                 <links>
6002                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6003                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6004                 </links>
6005         </class>
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6008                         <field name="high" reporter:datatype="money" />
6009                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6010                         <field name="low" reporter:datatype="money" />
6011                         <field name="name" reporter:datatype="text"/>
6012                         <field name="normal" reporter:datatype="money" />
6013                         <field name="recurrence_interval" reporter:datatype="interval"/>
6014             <field name="grace_period" reporter:datatype="interval" />
6015                 </fields>
6016                 <links/>
6017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6018             <actions>
6019                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6020                 <retrieve/>
6021                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6022                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6023             </actions>
6024         </permacrud>
6025         </class>
6026         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6027                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6028                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6029                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6030                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6031                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6032                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6033                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6034                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6035                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6036                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6037                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6038                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6039                 </fields>
6040                 <links>
6041                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6042                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6043                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6044                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6045                 </links>
6046         </class>
6047         <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">
6048                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6049                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6050                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6051                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6052                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6053                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6054                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6055                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6056                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6057                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6058                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6059                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6060                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6061                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6062                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6063                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6064                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6065                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6066                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6067                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6068                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6069                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6070                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6071                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6072                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6073                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6074                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6075                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6076                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6077                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6078                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6079                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6080                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6081                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6082                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6083                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6084                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6085                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6086                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6087                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6088                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6089                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6090                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6093                 </fields>
6094                 <links>
6095                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6096                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6097                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6098                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6100                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6101                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6102                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6103                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6104                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6105                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6106                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6107                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6108                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6109                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6110                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6111                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6112                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6113                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6114                 </links>
6115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6116             <actions>
6117                 <create permission="CREATE_COPY">
6118                     <context link="call_number" field="owning_lib"/>
6119                 </create>
6120                 <retrieve/>
6121                 <update permission="UPDATE_COPY">
6122                     <context link="call_number" field="owning_lib"/>
6123                 </update>
6124                 <delete permission="DELETE_COPY">
6125                     <context link="call_number" field="owning_lib"/>
6126                 </delete>
6127             </actions>
6128         </permacrud>
6129         </class>
6130
6131         <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">
6132                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6133                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6134                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6135                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6136                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6137                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6138                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6139                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6140                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6141                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6142                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6143                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6144                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6145                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6146                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6147                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6148                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6149                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6150                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6151                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6152                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6153                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6154                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6155                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6156                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6157                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6158                 </fields>
6159                 <links>
6160                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6161                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6162                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6163                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6164                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6165                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6166                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6167                 </links>
6168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6169                         <actions>
6170                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6171                                 <retrieve />
6172                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6173                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6174                         </actions>
6175                 </permacrud>
6176         </class>
6177
6178         <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">
6179                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6180                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6181                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6182                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6183                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6184                 </fields>
6185                 <links/>
6186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6187             <actions>
6188                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6189                 <retrieve/>
6190                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6191                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6192             </actions>
6193         </permacrud>
6194         </class>
6195         <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">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6197                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6198                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6199                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6200                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6201                 </fields>
6202                 <links/>
6203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6204             <actions>
6205                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6206                 <retrieve/>
6207                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6208                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6209             </actions>
6210         </permacrud>
6211         </class>
6212         <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">
6213                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6214                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6215                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6216                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6217                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6218                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6219                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6220                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6221                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6222                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6223                 </fields>
6224                 <links>
6225                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6226                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6227                 </links>
6228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6229             <actions>
6230                 <create permission="CREATE_PERM" global_required="true"/>
6231                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6232                 <update permission="UPDATE_PERM" global_required="true"/>
6233                 <delete permission="DELETE_PERM" global_required="true"/>
6234             </actions>
6235         </permacrud>
6236         </class>
6237         <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">
6238                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6239                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6240                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6241                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6242                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6243                 </fields>
6244                 <links>
6245                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6246                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6247                 </links>
6248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249             <actions>
6250                 <create permission="ADMIN_SURVEY">
6251                     <context link="question" jump="survey" field="owner"/>
6252                 </create>
6253                 <retrieve/>
6254                 <update permission="ADMIN_SURVEY">
6255                     <context link="question" jump="survey" field="owner"/>
6256                 </update>
6257                 <delete permission="ADMIN_SURVEY">
6258                     <context link="question" jump="survey" field="owner"/>
6259                 </delete>
6260             </actions>
6261         </permacrud>
6262         </class>
6263         <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">
6264                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6265                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6266                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6268                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6269                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6270                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6271                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6272                 </fields>
6273                 <links>
6274                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6275                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6276                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6277                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6278                 </links>
6279         </class>
6280         <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">
6281                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6282                         <field name="balance_owed" reporter:datatype="money" />
6283                         <field name="total_owed" reporter:datatype="money" />
6284                         <field name="total_paid" reporter:datatype="money" />
6285                         <field name="usr" reporter:datatype="link"/>
6286                 </fields>
6287                 <links>
6288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6289                 </links>
6290         </class>
6291         <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">
6292                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6293                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6294                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6295                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6296                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6297                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6298                 </fields>
6299                 <links>
6300                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6301                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6302                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6303                 </links>
6304         </class>
6305         <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">
6306                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6307                         <field name="field" reporter:datatype="link"/>
6308                         <field name="id" reporter:datatype="id" />
6309                         <field name="source" reporter:datatype="link"/>
6310                         <field name="value" reporter:datatype="text"/>
6311                 </fields>
6312                 <links>
6313                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6314                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6315                 </links>
6316         </class>
6317         <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">
6318                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6319                         <field name="field" reporter:datatype="link"/>
6320                         <field name="id" reporter:datatype="id" />
6321                         <field name="source" reporter:datatype="link"/>
6322                         <field name="value" reporter:datatype="text"/>
6323                 </fields>
6324                 <links>
6325                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6326                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6327                 </links>
6328         </class>
6329         <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">
6330                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6331                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6332                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6333                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6334                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6335                 </fields>
6336                 <links>
6337                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6338                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6339                 </links>
6340         </class>
6341         <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">
6342                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6343                         <field name="depth" reporter:datatype="int" />
6344                         <field name="grantable" reporter:datatype="bool"/>
6345                         <field name="grp" reporter:datatype="link"/>
6346                         <field name="id" reporter:datatype="id" />
6347                         <field name="perm" reporter:datatype="link"/>
6348                 </fields>
6349                 <links>
6350                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6351                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6352                 </links>
6353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6354             <actions>
6355                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6356                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6357                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6358                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6359             </actions>
6360         </permacrud>
6361         </class>
6362         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6363                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6364                         <field name="items" oils_persist:virtual="true" />
6365                         <field name="btype" reporter:datatype="text"/>
6366                         <field name="id" reporter:datatype="id" />
6367                         <field name="name" reporter:datatype="text"/>
6368                         <field name="description" reporter:datatype="text"/>
6369                         <field name="owner" reporter:datatype="link"/>
6370                         <field name="pub" reporter:datatype="bool"/>
6371                         <field name="create_time" reporter:datatype="timestamp" />
6372                 </fields>
6373                 <links>
6374                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6375                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6376                 </links>
6377         </class>
6378         <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">
6379                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6380                         <field name="id" reporter:datatype="id" />
6381                         <field name="bucket" reporter:datatype="link"/>
6382                         <field name="note" reporter:datatype="text" />
6383                 </fields>
6384                 <links>
6385                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6386                 </links>
6387         </class>
6388         <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">
6389                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6390                         <field name="id" reporter:datatype="int" />
6391                         <field name="usr" reporter:datatype="link"/>
6392                         <field name="work_ou" reporter:datatype="link"/>
6393                 </fields>
6394                 <links>
6395                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6396                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6397                 </links>
6398         </class>
6399         <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">
6400                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6401                         <field name="depth" reporter:datatype="int"/>
6402                         <field name="grantable" reporter:datatype="bool"/>
6403                         <field name="id" reporter:datatype="id" />
6404                         <field name="perm" reporter:datatype="link"/>
6405                         <field name="usr" reporter:datatype="link"/>
6406                 </fields>
6407                 <links>
6408                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6409                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6410                 </links>
6411         </class>
6412         <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">
6413                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6414                         <field name="object_id" reporter:datatype="text"/>
6415                         <field name="grantable" reporter:datatype="bool"/>
6416                         <field name="id" reporter:datatype="id" />
6417                         <field name="perm" reporter:datatype="link"/>
6418                         <field name="usr" reporter:datatype="link"/>
6419                         <field name="object_type" reporter:datatype="text"/>
6420                 </fields>
6421                 <links>
6422                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6423                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6424                 </links>
6425         </class>
6426         <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">
6427                 <fields oils_persist:primary="id" oils_persist:sequence="">
6428                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6429                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6430                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6431                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6432                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6433                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6434                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6435                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6436                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6437                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6438                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6439                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6440                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6441                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6442                 </fields>
6443                 <links>
6444                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6445                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6446                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6447                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6448                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6449                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6450                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6451                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6452                 </links>
6453         </class>
6454         <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">
6455                 <fields oils_persist:primary="id" oils_persist:sequence="">
6456                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6457                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6458                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6459                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6460                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6461                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6462                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6463                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6464                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6465                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6466                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6467                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6468                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6469                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6470                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6471                 </fields>
6472                 <links>
6473                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6474                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6475                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6476                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6477                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6478                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6479                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6480                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6481                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6482                 </links>
6483         </class>
6484         <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">
6485                 <fields oils_persist:primary="id" oils_persist:sequence="">
6486                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6487                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6488                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6489                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6490                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6491                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6492                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6493                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6494                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6495                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6496                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6497                 </fields>
6498                 <links>
6499                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6500                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6501                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6502                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6503                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6504                 </links>
6505         </class>
6506         <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">
6507                 <fields oils_persist:primary="id" oils_persist:sequence="">
6508                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6509                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6510                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6511                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6512                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6513                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6514                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6515                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6516                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6517                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6518                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6519                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6520                 </fields>
6521                 <links>
6522                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6523                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6524                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6525                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6526                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6527                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6528                 </links>
6529         </class>
6530         <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">
6531                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6532                         <field name="bucket" reporter:datatype="link"/>
6533                         <field name="id" reporter:datatype="id" />
6534                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6535                         <field name="create_time" reporter:datatype="timestamp" />
6536                         <field name="pos" reporter:datatype="int" />
6537                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6538                 </fields>
6539                 <links>
6540                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6541                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6542             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6543                 </links>
6544         </class>
6545         <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">
6546                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6547                         <field name="id" reporter:datatype="id" />
6548                         <field name="item" reporter:datatype="link"/>
6549                         <field name="note" reporter:datatype="text" />
6550                 </fields>
6551                 <links>
6552                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6553                 </links>
6554         </class>
6555         <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">
6556                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6557                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6558                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6559                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6560                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6561                 </fields>
6562                 <links>
6563                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6564                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6565                 </links>
6566         </class>
6567     <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">
6568         <fields oils_persist:primary="field">
6569             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6570             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6571             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6572         </fields>
6573         <links/>
6574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6575             <actions>
6576                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6577                 <retrieve />
6578                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6579                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6580             </actions>
6581         </permacrud>
6582     </class>
6583         <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">
6584                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6585                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6586                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6587                 </fields>
6588                 <links/>
6589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6590             <actions>
6591                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6592                 <retrieve/>
6593                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6594                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6595             </actions>
6596         </permacrud>
6597         </class>
6598
6599
6600         <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">
6601                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6602                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6603                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6604                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6605                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6606                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6607                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6608                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6609                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6610                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6611                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6612                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6613                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6614                 </fields>
6615                 <links>
6616                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6617                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6618                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6619                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6620                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6621                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6622                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6623                 </links>
6624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6625             <actions>
6626                 <create permission="TRANSIT_COPY">
6627                     <context link="target_copy" field="owner"/>
6628                 </create>
6629                 <retrieve/>
6630                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6631                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6632             </actions>
6633         </permacrud>
6634         </class>
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6637                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6638                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6639                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6640                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6641                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6642                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6643                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6644                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6645                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6647                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6648                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6649                 </fields>
6650                 <links>
6651                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6652                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6653                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6654                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6655                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6656                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6657                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6658                 </links>
6659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6660             <actions>
6661                 <create permission="TRANSIT_COPY" context_field="owner">
6662                     <context link="target_copy" field="circ_lib"/>
6663                 </create>
6664                 <retrieve/>
6665                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6666                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6667             </actions>
6668         </permacrud>
6669         </class>
6670         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6671                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6672                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6673                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6674                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6675                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6676                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6677                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6678                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6679                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6680                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6681                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6682                 </fields>
6683                 <links>
6684                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6685                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6686                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6687                 </links>
6688         </class>
6689         <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">
6690                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6691                         <field name="grp" />
6692                         <field name="id" reporter:datatype="id" />
6693                         <field name="usr" />
6694                 </fields>
6695                 <links>
6696                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6697                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6698                 </links>
6699         </class>
6700         <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">
6701                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6702                         <field name="id" reporter:datatype="id" />
6703                         <field name="fq_field" reporter:datatype="text"/>
6704                         <field name="identity_value" reporter:datatype="text"/>
6705                         <field name="translation" reporter:datatype="text"/>
6706                         <field name="string" reporter:datatype="text"/>
6707                 </fields>
6708                 <links>
6709                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6710                 </links>
6711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6712             <actions>
6713                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6714                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6715                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6716                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6717             </actions>
6718         </permacrud>
6719         </class>
6720         <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">
6721                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6722                         <field name="id" reporter:datatype="id" />
6723                         <field name="fm_class" reporter:datatype="text"/>
6724                         <field name="field" reporter:datatype="text"/>
6725                         <field name="owner" reporter:datatype="org_unit"/>
6726                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6727                 </fields>
6728                 <links>
6729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6730                 </links>
6731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732             <actions>
6733                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6734                 <retrieve/>
6735                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6736                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6737             </actions>
6738         </permacrud>
6739         </class>
6740         <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">
6741                 <fields oils_persist:primary="code">
6742                         <field name="code" reporter:datatype="id" />
6743                         <field name="marc_code" reporter:datatype="text"/>
6744                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6745                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6746                 </fields>
6747                 <links/>
6748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6749             <actions>
6750                 <create permission="CREATE_LOCALE" global_required="true"/>
6751                 <retrieve/>
6752                 <update permission="UPDATE_LOCALE" global_required="true"/>
6753                 <delete permission="DELETE_LOCALE" global_required="true"/>
6754             </actions>
6755         </permacrud>
6756         </class>
6757         <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">
6758                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6759                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6760                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6761                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6762             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6763                 </fields>
6764                 <links>
6765                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6766                 </links>
6767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6768             <actions>
6769                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6770                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6771                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6772                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6773             </actions>
6774         </permacrud>
6775         </class>
6776
6777         <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">
6778                 <fields oils_persist:primary="id">
6779                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6780                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6781                 </fields>
6782                 <links/>
6783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6784             <actions>
6785                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6786                 <retrieve/>
6787                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6788                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6789             </actions>
6790         </permacrud>
6791         </class>
6792
6793         <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">
6794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6795                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6796                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6797                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6798                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6799                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6800                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6801                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6802                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6803                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6804                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6805                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6806                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6807                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6808                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6809                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6810                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6811                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6812                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6813                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6814                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6815                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6816                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6817                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6818                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6819                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6820                 </fields>
6821                 <links>
6822                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6823                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6824                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6825                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6826                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6827                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6828                 </links>
6829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6830             <actions>
6831                 <create permission="user_request.create">
6832                     <context link="usr" field="home_ou"/>
6833                                 </create>
6834                 <retrieve permission="user_request.view">
6835                     <context link="usr" field="home_ou"/>
6836                                 </retrieve>
6837                 <update permission="user_request.update">
6838                     <context link="usr" field="home_ou"/>
6839                                 </update>
6840                 <delete permission="user_request.delete">
6841                     <context link="usr" field="home_ou"/>
6842                                 </delete>
6843             </actions>
6844         </permacrud>
6845         </class>
6846
6847         <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">
6848                 <fields oils_persist:primary="code">
6849                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6850                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6851                 </fields>
6852                 <links/>
6853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6854             <actions>
6855                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6856                 <retrieve/>
6857                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6858                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6859             </actions>
6860         </permacrud>
6861         </class>
6862
6863         <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">
6864                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6865                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6866                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6867                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6868                         <field reporter:label="Ratio" name="ratio" />
6869                 </fields>
6870                 <links>
6871                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6872                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6873                 </links>
6874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6875                         <actions>
6876                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6877                                 <retrieve/>
6878                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6879                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6880                         </actions>
6881                 </permacrud>
6882         </class>
6883
6884         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6886                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6887                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6888                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6889                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6890                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6891                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6892                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6893                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6894                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6895                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6896                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6897                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6898                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6899                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6900                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6901                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6902                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
6903                 </fields>
6904                 <links>
6905                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6906                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6907             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6908             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6909             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6910                 </links>
6911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6912             <actions>
6913                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6914                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6915                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6916                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6917             </actions>
6918         </permacrud>
6919         </class>
6920
6921         <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">
6922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6923                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6924                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6925                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6926                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6927                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6928                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6929                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6930                 </fields>
6931                 <links>
6932                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6933                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6934                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6935                 </links>
6936         </class>
6937
6938         <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">
6939                 <fields oils_persist:primary="code">
6940                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6941                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6942                 </fields>
6943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6944             <actions>
6945                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6946                 <retrieve/>
6947                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6948                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6949             </actions>
6950                 </permacrud>
6951         </class>
6952
6953         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6955                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6956                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6957                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6958                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6959                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6960                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6961                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6962                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6963                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6964                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6965                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6966                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6967                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6968                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6969                 </fields>
6970                 <links>
6971                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6972                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6973                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6974                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6975                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6976                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6977                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6978                 </links>
6979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6980             <actions>
6981                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6982                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6983                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6984                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6985             </actions>
6986         </permacrud>
6987         </class>
6988
6989         <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">
6990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6991                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6992                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6993                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6994                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6995                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6996                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6997                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6998                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6999                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7000                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7001                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7002                 </fields>
7003                 <links>
7004                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7005                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7006                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7007                 </links>
7008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7009             <actions>
7010                 <create   permission="ADMIN_INVOICE">
7011                                         <context link="invoice" field="receiver"/>
7012                                 </create>
7013                 <retrieve permission="ADMIN_INVOICE">
7014                                         <context link="invoice" field="receiver"/>
7015                                 </retrieve>
7016                 <update   permission="ADMIN_INVOICE">
7017                                         <context link="invoice" field="receiver"/>
7018                                 </update>
7019                                 <delete   permission="ADMIN_INVOICE">
7020                                         <context link="invoice" field="receiver"/>
7021                                 </delete>
7022             </actions>
7023         </permacrud>
7024         </class>
7025
7026         <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">
7027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7028                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7029                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7030                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7031                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7032                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7033                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7034                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7035                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7036                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7037                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7038                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7039                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7040                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7041                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7042                 </fields>
7043                 <links>
7044                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7045                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7046                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7047                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7048                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7049                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7050                 </links>
7051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7052             <actions>
7053                 <create   permission="ADMIN_INVOICE">
7054                                         <context link="invoice" field="receiver"/>
7055                                 </create>
7056                 <retrieve permission="ADMIN_INVOICE">
7057                                         <context link="invoice" field="receiver"/>
7058                                 </retrieve>
7059                 <update   permission="ADMIN_INVOICE">
7060                                         <context link="invoice" field="receiver"/>
7061                                 </update>
7062                                 <delete   permission="ADMIN_INVOICE">
7063                                         <context link="invoice" field="receiver"/>
7064                                 </delete>
7065             </actions>
7066         </permacrud>
7067         </class>
7068
7069         <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">
7070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7071                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7072                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7073                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7074                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7075                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7076                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7077                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7078                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7079                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7080                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7081                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7082                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7083                 </fields>
7084                 <links>
7085                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7086                 </links>
7087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7088             <actions>
7089                 <create permission="ADMIN_PROVIDER">
7090                     <context link="provider" field="owner"/>
7091                 </create>
7092                 <retrieve permission="ADMIN_PROVIDER">
7093                     <context link="provider" field="owner"/>
7094                 </retrieve>
7095                 <update permission="ADMIN_PROVIDER">
7096                     <context link="provider" field="owner"/>
7097                 </update>
7098                 <delete permission="ADMIN_PROVIDER">
7099                     <context link="provider" field="owner"/>
7100                 </delete>
7101             </actions>
7102         </permacrud>
7103         </class>
7104
7105         <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">
7106                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7107                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7108                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7109                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7110                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7111                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7112                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7113         </fields>
7114                 <links>
7115                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7116                 </links>
7117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7118             <actions>
7119                 <create permission="ADMIN_PROVIDER">
7120                     <context link="provider" field="owner"/>
7121                 </create>
7122                 <retrieve permission="ADMIN_PROVIDER">
7123                     <context link="provider" field="owner"/>
7124                 </retrieve>
7125                 <update permission="ADMIN_PROVIDER">
7126                     <context link="provider" field="owner"/>
7127                 </update>
7128                 <delete permission="ADMIN_PROVIDER">
7129                     <context link="provider" field="owner"/>
7130                 </delete>
7131             </actions>
7132         </permacrud>
7133     </class>
7134         <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">
7135                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7136                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7137                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7138                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7139                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7140                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7141                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7142                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7143                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7144                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7145                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7146                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7147                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7148                 </fields>
7149                 <links>
7150                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7151                 </links>
7152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7153             <actions>
7154                 <create permission="ADMIN_PROVIDER">
7155                     <context link="contact" jump='provider' field="owner"/>
7156                 </create>
7157                 <retrieve permission="ADMIN_PROVIDER">
7158                     <context link="contact" jump='provider' field="owner"/>
7159                 </retrieve>
7160                 <update permission="ADMIN_PROVIDER">
7161                     <context link="contact" jump='provider' field="owner"/>
7162                 </update>
7163                 <delete permission="ADMIN_PROVIDER">
7164                     <context link="contact" jump='provider' field="owner"/>
7165                 </delete>
7166             </actions>
7167         </permacrud>
7168         </class>
7169
7170         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7172                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7173                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7174                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7175                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7176                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7177                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7178                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7179                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7180                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7181                 </fields>
7182                 <links>
7183                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7184                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7185                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7186                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7187                 </links>
7188         </class>
7189
7190         <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">
7191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7192                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7193                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7194                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7195                 </fields>
7196                 <links>
7197             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7198                 </links>
7199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7200                         <actions>
7201                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7202                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7203                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7204                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7205                         </actions>
7206                 </permacrud>
7207         </class>
7208
7209         <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">
7210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7211                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7212                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7213                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7214                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7215                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7216                 </fields>
7217                 <links>
7218                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7219                 </links>
7220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7221                         <actions>
7222                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7223                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7224                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7225                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7226                         </actions>
7227                 </permacrud>
7228         </class>
7229
7230         <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">
7231                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7232                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7233                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7234                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7235                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7236                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7237                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7238                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7239                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7240                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7241                 </fields>
7242                 <links>
7243                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7244                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7245             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7246             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7247                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7248                 </links>
7249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7250             <actions>
7251                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7252                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7253                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7254                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7255             </actions>
7256         </permacrud>
7257         </class>
7258
7259         <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">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7261                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7262                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7263                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7264                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7265                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7266                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7267                 </fields>
7268                 <links>
7269                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7270                 </links>
7271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7272                         <actions>
7273                                 <create permission="ADMIN_FUNDING_SOURCE">
7274                     <context link="funding_source" field="owner"/>
7275                 </create>
7276                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7277                     <context link="funding_source" field="owner"/>
7278                 </retrieve>
7279                                 <update permission="ADMIN_FUNDING_SOURCE">
7280                     <context link="funding_source" field="owner"/>
7281                 </update>
7282                                 <delete permission="ADMIN_FUNDING_SOURCE">
7283                     <context link="funding_source" field="owner"/>
7284                 </delete>
7285                         </actions>
7286                 </permacrud>
7287         </class>
7288
7289         <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">
7290                 <fields oils_persist:primary="id">
7291                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7292                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7293                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7294                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7295                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7296                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7297                 </fields>
7298                 <links>
7299                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7300                 </links>
7301         </class>
7302
7303         <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">
7304                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7305                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7306                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7307                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7308                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7309                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7310                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7311                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7312                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7313                 </fields>
7314                 <links>
7315                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7316                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7317                 </links>
7318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7319                         <actions>
7320                                 <create permission="ADMIN_ACQ_FUND">
7321                     <context link="fund" field="org"/>
7322                 </create>
7323                                 <retrieve permission="ADMIN_ACQ_FUND">
7324                     <context link="fund" field="org"/>
7325                 </retrieve>
7326                                 <update permission="ADMIN_ACQ_FUND">
7327                     <context link="fund" field="org"/>
7328                 </update>
7329                                 <delete permission="ADMIN_ACQ_FUND">
7330                     <context link="fund" field="org"/>
7331                 </delete>
7332                         </actions>
7333                 </permacrud>
7334         </class>
7335
7336         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7337                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7338                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7339                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7340                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7341                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7342                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7343                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7344                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7345                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7346                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7347                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7348                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7349                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7350                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7351                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7352                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7353                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7354                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7355                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7356                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7358                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7359                 </fields>
7360                 <links>
7361                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7362                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7363             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7364             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7365             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7366             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7367             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7368             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7369             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7370             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7371             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7372                 </links>
7373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7374             <actions>
7375                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7376                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7377                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7378                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7379             </actions>
7380         </permacrud>
7381         </class>
7382
7383         <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">
7384                 <fields oils_persist:primary="fund">
7385                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7386                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7387                 </fields>
7388                 <links>
7389                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7390                 </links>
7391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7392             <actions>
7393                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7394                                         <context link="fund" field="org" />
7395                 </retrieve>
7396             </actions>
7397         </permacrud>
7398         </class>
7399
7400         <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">
7401                 <fields oils_persist:primary="fund">
7402                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7403                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7404                 </fields>
7405                 <links>
7406                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7407                 </links>
7408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7409             <actions>
7410                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7411                                         <context link="fund" field="org" />
7412                 </retrieve>
7413             </actions>
7414         </permacrud>
7415         </class>
7416
7417         <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">
7418                 <fields oils_persist:primary="fund">
7419                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7420                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7421                 </fields>
7422                 <links>
7423                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7424                 </links>
7425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7426             <actions>
7427                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7428                                         <context link="fund" field="org" />
7429                 </retrieve>
7430             </actions>
7431         </permacrud>
7432         </class>
7433
7434         <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">
7435                 <fields oils_persist:primary="fund">
7436                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7437                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7438                 </fields>
7439                 <links>
7440                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7441                 </links>
7442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7443             <actions>
7444                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7445                                         <context link="fund" field="org" />
7446                 </retrieve>
7447             </actions>
7448         </permacrud>
7449         </class>
7450
7451         <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">
7452                 <fields oils_persist:primary="fund">
7453                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7454                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7455                 </fields>
7456                 <links>
7457                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7458                 </links>
7459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7460             <actions>
7461                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7462                                         <context link="fund" field="org" />
7463                 </retrieve>
7464             </actions>
7465         </permacrud>
7466         </class>
7467
7468    <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">
7469         <fields oils_persist:primary="fund">
7470             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7471             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7472         </fields>
7473         <links>
7474             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7475         </links>
7476     </class>
7477
7478    <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">
7479         <fields oils_persist:primary="fund">
7480             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7481             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7482         </fields>
7483         <links>
7484             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7485         </links>
7486     </class>
7487
7488    <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">
7489         <fields oils_persist:primary="fund">
7490             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7491             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7492         </fields>
7493         <links>
7494             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7495         </links>
7496     </class>
7497
7498    <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">
7499         <fields oils_persist:primary="fund">
7500             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7501             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7502         </fields>
7503         <links>
7504             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7505         </links>
7506     </class>
7507
7508    <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">
7509         <fields oils_persist:primary="fund">
7510             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7511             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7512         </fields>
7513         <links>
7514             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7515         </links>
7516     </class>
7517
7518         <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">
7519                 <fields oils_persist:primary="funding_source">
7520                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7521                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7522                 </fields>
7523                 <links>
7524                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7525                 </links>
7526         </class>
7527
7528         <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">
7529                 <fields oils_persist:primary="funding_source">
7530                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7531                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7532                 </fields>
7533                 <links>
7534                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7535                 </links>
7536         </class>
7537
7538         <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">
7539                 <fields oils_persist:primary="funding_source">
7540                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7541                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7542                 </fields>
7543                 <links>
7544                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7545                 </links>
7546         </class>
7547
7548         <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">
7549                 <fields oils_persist:primary="fund">
7550                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7551                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7552                 </fields>
7553                 <links>
7554                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7555                 </links>
7556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7557             <actions>
7558                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7559                                         <context link="fund" field="org" />
7560                 </retrieve>
7561             </actions>
7562         </permacrud>
7563     </class>
7564     <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">
7565         <oils_persist:source_definition><![CDATA[
7566             SELECT
7567                 acqf.*,
7568                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7569                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7570                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7571                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7572             FROM
7573                 acq.fund acqf
7574                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7575                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7576                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7577                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7578         ]]></oils_persist:source_definition>
7579         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7580             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7581             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7582             <field reporter:label="Name" name="name" reporter:datatype="text" />
7583             <field reporter:label="Year" name="year" reporter:datatype="int" />
7584             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7585             <field reporter:label="Code" name="code" reporter:datatype="text" />
7586             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7587             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7588             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7589             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7590             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7591
7592             <!-- non fund-native fields -->
7593             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7594             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7595             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7596             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7597         </fields>
7598         <links>
7599             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7600             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7601             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7602         </links>
7603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7604             <actions>
7605                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7606             </actions>
7607         </permacrud>
7608         </class>
7609         <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">
7610                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7611                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7612                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7613                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7614                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7615                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7616                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7617                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7618                 </fields>
7619                 <links>
7620                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7621                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7622                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7623                 </links>
7624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625                         <actions>
7626                                 <create permission="ADMIN_ACQ_FUND">
7627                     <context link="fund" field="org"/>
7628                 </create>
7629                                 <retrieve permission="ADMIN_ACQ_FUND">
7630                     <context link="fund" field="org"/>
7631                 </retrieve>
7632                                 <update permission="ADMIN_ACQ_FUND">
7633                     <context link="fund" field="org"/>
7634                 </update>
7635                                 <delete permission="ADMIN_ACQ_FUND">
7636                     <context link="fund" field="org"/>
7637                 </delete>
7638                         </actions>
7639                 </permacrud>
7640         </class>
7641
7642     <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">
7643         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7644             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7645             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7646             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7647             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7648             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7649             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7650             <field reporter:label="Note" name="note" reporter:datatype="text" />
7651             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7652         </fields>
7653         <links>
7654             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7655             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7656             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7657         </links>
7658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7659                         <actions>
7660                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7661                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7662                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7663                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7664                         </actions>
7665                 </permacrud>
7666     </class>
7667
7668         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7670                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7671                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7672                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7673                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7674                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7675                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7676                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7677                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7678                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7679                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7680                 </fields>
7681                 <links>
7682                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7683                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7684                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7685                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7686                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7687                 </links>
7688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7689                         <actions>
7690                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7691                         </actions>
7692                 </permacrud>
7693         </class>
7694
7695         <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">
7696                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7697                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7698                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7699                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7700                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7701                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7702                 </fields>
7703                 <links>
7704                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7705                 </links>
7706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7707                         <actions>
7708                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7709                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7710                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7711                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7712                         </actions>
7713                 </permacrud>
7714         </class>
7715
7716         <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">
7717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7718                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7719                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7720                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7721                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7722                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7723                         <field reporter:label="State" name="state" reporter:datatype="text" />
7724                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7725                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7726                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7727                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7728                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7729                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7730                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7731                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7732                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7733                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7734                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7735                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7736                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7737                 </fields>
7738                 <links>
7739                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7740                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7741                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7742                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7743                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7744                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7745                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7746                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7747                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7748                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7749                 </links>
7750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7751                         <actions>
7752                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7753                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7754                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7755                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7756                         </actions>
7757                 </permacrud>
7758         </class>
7759
7760         <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">
7761                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7762                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7763                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7764                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7765                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7766                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7767                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7768                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7769                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7770                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7771                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7772                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7773                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7774                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7775                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7776                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7777                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7778                 </fields>
7779                 <links>
7780                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7781                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7782                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7783                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7784                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7785                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7786                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7787                 </links>
7788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7789             <actions>
7790                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7791             </actions>
7792                 </permacrud>
7793         </class>
7794
7795         <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">
7796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7797                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7798                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7799                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7800                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7801                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7802                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7803                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7804                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7805                 </fields>
7806                 <links>
7807                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7808                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7809                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7810                 </links>
7811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7812             <actions>
7813                 <create permission="CREATE_PURCHASE_ORDER">
7814                     <context link="purchase_order" field="ordering_agency"/>
7815                 </create>
7816                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7817                     <context link="purchase_order" field="ordering_agency"/>
7818                 </retrieve>
7819                 <update permission="CREATE_PURCHASE_ORDER">
7820                     <context link="purchase_order" field="ordering_agency"/>
7821                 </update>
7822                 <delete permission="CREATE_PURCHASE_ORDER">
7823                     <context link="purchase_order" field="ordering_agency"/>
7824                 </delete>
7825             </actions>
7826                 </permacrud>
7827         </class>
7828
7829         <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">
7830                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7831                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7832                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7833                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7834                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7835                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7836                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7837                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7838                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7839                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7840                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7841                 </fields>
7842                 <links>
7843                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7844                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7845                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7846                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7847                 </links>
7848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849             <actions>
7850                 <create permission="CREATE_PURCHASE_ORDER">
7851                     <context link="purchase_order" field="ordering_agency"/>
7852                 </create>
7853                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7854                     <context link="purchase_order" field="ordering_agency"/>
7855                 </retrieve>
7856                 <update permission="CREATE_PURCHASE_ORDER">
7857                     <context link="purchase_order" field="ordering_agency"/>
7858                 </update>
7859                 <delete permission="CREATE_PURCHASE_ORDER">
7860                     <context link="purchase_order" field="ordering_agency"/>
7861                 </delete>
7862             </actions>
7863                 </permacrud>
7864         </class>
7865
7866         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7868                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7869                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7870                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7871                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7872                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7873                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7874                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7875                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7876                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7877                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7878                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7879                         <field reporter:label="State" name="state" reporter:datatype="text" />
7880                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7881                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7882                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7883                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7884                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7885                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7886                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7887                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7888                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7889                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7890                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7891                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7892                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7893                 </fields>
7894                 <links>
7895                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7896                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7898                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7899                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7900                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7901                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7902                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7903                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7904                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7905                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7906                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7907                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7908                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7909                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7910                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7911                 </links>
7912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913                         <actions>
7914                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7915                                         <context link="purchase_order" field="ordering_agency"/>
7916                                         <context link="picklist" field="org_unit"/>
7917                                 </retrieve>
7918                         </actions>
7919                 </permacrud>
7920         </class>
7921
7922         <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">
7923                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7924                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7925                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7926                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7927                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7928                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7929                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7930                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7931                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7932                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7933                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7934                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7935                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7936                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7937                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7938                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7939                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7940                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7941                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7942                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7943                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7944                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7945                 </fields>
7946                 <links>
7947                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7948                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7949                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7950                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7951                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7952                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7953                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7954                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7955                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7956                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7957                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7958                 </links>
7959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7960                         <actions>
7961                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7962                                         <context link="purchase_order" field="ordering_agency"/>
7963                                         <context link="picklist" field="org_unit"/>
7964                                 </retrieve>
7965                         </actions>
7966                 </permacrud>
7967         </class>
7968
7969         <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">
7970                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7971                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7972                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7973                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7974                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7975                 </fields>
7976                 <links>
7977                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7978                 </links>
7979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7980                         <actions>
7981                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7982                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7983                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7984                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7985                         </actions>
7986                 </permacrud>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7991                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7992                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7993                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7994                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7995                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7996                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7997                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7998                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7999                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8000                 </fields>
8001                 <links>
8002                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8003                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8004                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8005                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8006                 </links>
8007         </class>
8008
8009         <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">
8010                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8011                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8012                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8013                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8014                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8015                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8016                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8017                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8018                 </fields>
8019                 <links>
8020                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8021                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8022                 </links>
8023         </class>
8024
8025         <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">
8026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8027                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8028                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8029                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8030                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8031                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8032                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8033                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8034                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8035                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8036                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8037                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8038                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8039                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8040                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8041                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8042                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8043                 </fields>
8044                 <links>
8045                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8046                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8047                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8048                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8049                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8050                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8051                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8052                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8053                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8054                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8055                 </links>
8056         </class>
8057
8058         <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">
8059                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8060                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8061                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8062                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8063                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8064                 </fields>
8065                 <links/>
8066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8067                         <actions>
8068                                 <retrieve />
8069                         </actions>
8070                 </permacrud>
8071         </class>
8072
8073         <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">
8074                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8075                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8076                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8077                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8078                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8079                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8080             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8081                 </fields>
8082                 <links/>
8083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8084             <actions>
8085                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8086                 <retrieve />
8087                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8088                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8089             </actions>
8090         </permacrud>
8091         </class>
8092
8093         <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">
8094                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8095                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8096                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8097                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8098                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8099                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8100                 </fields>
8101                 <links/>
8102         </class>
8103         <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">
8104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8105                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8106                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8107                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8108                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8109                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8110                 </fields>
8111                 <links>
8112                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8113                 </links>
8114         </class>
8115
8116         <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">
8117             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8118                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8119                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8120                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8121                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8122                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8123                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8124         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8125
8126             </fields>
8127             <links>
8128                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8129             </links>
8130             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8131                 <actions>
8132                     <create permission="ADMIN_PROVIDER">
8133                         <context link="provider" field="owner"/>
8134                     </create>
8135                     <retrieve permission="ADMIN_PROVIDER">
8136                         <context link="provider" field="owner"/>
8137                     </retrieve>
8138                     <update permission="ADMIN_PROVIDER">
8139                         <context link="provider" field="owner"/>
8140                     </update>
8141                     <delete permission="ADMIN_PROVIDER">
8142                         <context link="provider" field="owner"/>
8143                     </delete>
8144                 </actions>
8145             </permacrud>
8146         </class>
8147         
8148         <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">
8149             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8150                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8151                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8152                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8153                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8154             </fields>
8155             <links>
8156                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8157             </links>
8158             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8159                 <actions>
8160                     <create permission="ADMIN_PROVIDER">
8161                         <context link="provider" field="owner"/>
8162                     </create>
8163                     <retrieve permission="ADMIN_PROVIDER">
8164                         <context link="provider" field="owner"/>
8165                     </retrieve>
8166                     <update permission="ADMIN_PROVIDER">
8167                         <context link="provider" field="owner"/>
8168                     </update>
8169                     <delete permission="ADMIN_PROVIDER">
8170                         <context link="provider" field="owner"/>
8171                     </delete>
8172                 </actions>
8173             </permacrud>
8174         </class>
8175         
8176         <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">
8177             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8178                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8179                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8180                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8181                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8182                 </fields>
8183                 <links/>
8184         </class>
8185
8186         <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">
8187                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8188                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8189                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8190                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8191                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8192                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8193                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8194                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8195                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8196                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8197                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8198                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8199                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8200                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8201                 </fields>
8202                 <links>
8203                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8205                 </links>
8206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8207             <actions>
8208                 <create permission="ADMIN_PROVIDER">
8209                     <context link="provider" field="owner"/>
8210                 </create>
8211                 <retrieve permission="ADMIN_PROVIDER">
8212                     <context link="provider" field="owner"/>
8213                 </retrieve>
8214                 <update permission="ADMIN_PROVIDER">
8215                     <context link="provider" field="owner"/>
8216                 </update>
8217                 <delete permission="ADMIN_PROVIDER">
8218                     <context link="provider" field="owner"/>
8219                 </delete>
8220             </actions>
8221         </permacrud>
8222         </class>
8223
8224         <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">
8225                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8226                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8227                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8228                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8229                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8230                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8231                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8232                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8233                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8234                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8235                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8236                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8237                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8238                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8239                 </fields>
8240                 <links>
8241                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8242                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8243                 </links>
8244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8245             <actions>
8246                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8247                     <context link="account" jump="provider" field="owner"/>
8248                 </retrieve>
8249                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8250                     <context link="account" jump="provider" field="owner"/>
8251                 </update>
8252                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8253                     <context link="account" jump="provider" field="owner"/>
8254                 </delete>
8255             </actions>
8256         </permacrud>
8257         </class>
8258
8259
8260         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8261                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8262                         <field name="id" reporter:datatype="id" />
8263                         <field name="parent" reporter:datatype="link"/>
8264                         <field name="owner" reporter:datatype="link"/>
8265                         <field name="create_time" reporter:datatype="timestamp"/>
8266                         <field name="name" reporter:datatype="text"/>
8267                         <field name="shared" reporter:datatype="bool"/>
8268                         <field name="share_with" reporter:datatype="link"/>
8269                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8270                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8271                 </fields>
8272                 <links>
8273                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8274                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8275                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8276                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8277                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8278                 </links>
8279         </class>
8280         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8281                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8282                         <field name="id" reporter:datatype="id" />
8283                         <field name="parent" reporter:datatype="link"/>
8284                         <field name="owner" reporter:datatype="link"/>
8285                         <field name="create_time" reporter:datatype="timestamp"/>
8286                         <field name="name" reporter:datatype="text"/>
8287                         <field name="shared" reporter:datatype="bool"/>
8288                         <field name="share_with" reporter:datatype="link"/>
8289                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8290                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8291                 </fields>
8292                 <links>
8293                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8294                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8295                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8296                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8297                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8298                 </links>
8299         </class>
8300         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8301                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8302                         <field name="id" reporter:datatype="id" />
8303                         <field name="parent" reporter:datatype="link"/>
8304                         <field name="owner" reporter:datatype="link"/>
8305                         <field name="create_time" reporter:datatype="timestamp"/>
8306                         <field name="name" reporter:datatype="text"/>
8307                         <field name="shared" reporter:datatype="bool"/>
8308                         <field name="share_with" reporter:datatype="link"/>
8309                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8310                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8311                 </fields>
8312                 <links>
8313                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8314                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8315                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8316                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8317                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8318                 </links>
8319         </class>
8320         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8321                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8322                         <field name="id" reporter:datatype="id" />
8323                         <field name="owner" reporter:datatype="link"/>
8324                         <field name="create_time" reporter:datatype="timestamp"/>
8325                         <field name="name" reporter:datatype="text"/>
8326                         <field name="data" reporter:datatype="text"/>
8327                         <field name="folder" reporter:datatype="link"/>
8328                         <field name="description" reporter:datatype="text"/>
8329                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8330                 </fields>
8331                 <links>
8332                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8333                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8334                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8335                 </links>
8336         </class>
8337         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8338                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8339                         <field name="id" reporter:datatype="id" />
8340                         <field name="owner" reporter:datatype="link"/>
8341                         <field name="create_time" reporter:datatype="timestamp"/>
8342                         <field name="template" reporter:datatype="link"/>
8343                         <field name="data" reporter:datatype="text"/>
8344                         <field name="folder" reporter:datatype="link"/>
8345                         <field name="recur" reporter:datatype="bool"/>
8346                         <field name="recurrence" reporter:datatype="interval"/>
8347                         <field name="name" reporter:datatype="text"/>
8348                         <field name="description" reporter:datatype="text"/>
8349                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8350                 </fields>
8351                 <links>
8352                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8353                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8354                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8355                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8356                 </links>
8357         </class>
8358         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8359                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8360                         <field name="id" reporter:datatype="id" />
8361                         <field name="runner" reporter:datatype="link"/>
8362                         <field name="start_time" reporter:datatype="timestamp"/>
8363                         <field name="complete_time" reporter:datatype="timestamp"/>
8364                         <field name="run_time" reporter:datatype="timestamp"/>
8365                         <field name="email" reporter:datatype="text"/>
8366                         <field name="excel_format" reporter:datatype="bool"/>
8367                         <field name="csv_format" reporter:datatype="bool"/>
8368                         <field name="html_format" reporter:datatype="bool"/>
8369                         <field name="error_code" reporter:datatype="int"/>
8370                         <field name="error_text" reporter:datatype="text"/>
8371                         <field name="report" reporter:datatype="link"/>
8372                         <field name="folder" reporter:datatype="link"/>
8373                         <field name="chart_pie" reporter:datatype="bool"/>
8374                         <field name="chart_bar" reporter:datatype="bool"/>
8375                         <field name="chart_line" reporter:datatype="bool"/>
8376                 </fields>
8377                 <links>
8378                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8379                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8380                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8381                 </links>
8382         </class>
8383         <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">
8384                 <fields oils_persist:primary="id">
8385                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8386                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8387                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8388                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8389                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8390                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8391                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8392                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8393                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8394                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8395                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8396                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8397                 </fields>
8398                 <links>
8399                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8400                 </links>
8401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8402                         <actions>
8403                                 <retrieve />
8404                         </actions>
8405                 </permacrud>
8406         </class>
8407         <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">
8408                 <fields oils_persist:primary="id">
8409                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8410                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8411                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8412                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8413                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8414                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8415                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8416                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8417                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8418                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8419                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8420                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8421                 </fields>
8422                 <links>
8423                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8424                 </links>
8425         </class>
8426         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8427                 <fields oils_persist:primary="id">
8428                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8429                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8430                         <field reporter:label="Fingerprint" name="fingerprint" />
8431                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8432                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8433                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8434                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8435                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8436                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8437                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8438                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8439                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8440                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8441                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8442                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8443                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8444                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8445                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8446                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8447                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8448                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8449                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8450                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8451                 </fields>
8452                 <links>
8453                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8454                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8455                 </links>
8456         </class>
8457         <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">
8458                 <fields oils_persist:primary="id">
8459                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8460                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8461                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8462                 </fields>
8463                 <links>
8464                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8465                 </links>
8466         </class>
8467         <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">
8468                 <fields oils_persist:primary="id">
8469                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8470                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8471                 </fields>
8472                 <links>
8473                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8474                 </links>
8475         </class>
8476         <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">
8477                 <fields oils_persist:primary="id">
8478                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8479                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8480                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8481                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8482                 </fields>
8483                 <links>
8484                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8485                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8486                 </links>
8487         </class>
8488         <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">
8489                 <fields oils_persist:primary="xact">
8490                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8491                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8492                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8493                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8494                 </fields>
8495                 <links>
8496                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8497                 </links>
8498         </class>
8499         <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">
8500                 <fields oils_persist:primary="xact">
8501                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8502                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8503                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8504                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8505                 </fields>
8506                 <links>
8507                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8508                 </links>
8509         </class>
8510         <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)">
8511                 <fields oils_persist:primary="id">
8512                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8513                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8514                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8515                 </fields>
8516                 <links>
8517                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8518                 </links>
8519         </class>
8520         <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">
8521                 <fields oils_persist:primary="id">
8522                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8523                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8524                 </fields>
8525                 <links>
8526                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8527                 </links>
8528         </class>
8529         <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">
8530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8531                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8532                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8533                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8534                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8535                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8536                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8537                 </fields>
8538                 <links>
8539                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8540                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8541                 </links>
8542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8543                         <actions>
8544                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8545                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8546                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8547                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8548                         </actions>
8549                 </permacrud>
8550         </class>
8551         <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">
8552                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8553                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8554                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8555                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8556                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8557                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8558                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8559                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8560                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8561                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8562                 </fields>
8563                 <links>
8564                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8565                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8566                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8567                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8568                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8569                 </links>
8570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8571                         <actions>
8572                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8573                                         <context link="formula" field="owner"/>
8574                                 </create>
8575                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8576                                         <context link="formula" field="owner"/>
8577                                 </retrieve>
8578                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8579                                         <context link="formula" field="owner"/>
8580                                 </update>
8581                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8582                                         <context link="formula" field="owner"/>
8583                                 </delete>
8584                         </actions>
8585                 </permacrud>
8586         </class>
8587
8588         <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">
8589                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8590                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8591                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8592                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8593                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8594                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8595                 </fields>
8596                 <links>
8597                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8598                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8599                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8600                 </links>
8601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8602                         <actions>
8603                                 <create permission="CREATE_PURCHASE_ORDER">
8604                                         <context link="formula" field="owner"/>
8605                 </create>
8606                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8607                                         <context link="formula" field="owner"/>
8608                 </retrieve>
8609                                 <update permission="CREATE_PURCHASE_ORDER">
8610                                         <context link="formula" field="owner"/>
8611                 </update>
8612                                 <delete permission="CREATE_PURCHASE_ORDER">
8613                                         <context link="formula" field="owner"/>
8614                 </delete>
8615                         </actions>
8616                 </permacrud>
8617         </class>
8618
8619         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8620                 <fields oils_persist:primary="id">
8621                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8622                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8623                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8624                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8625                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8626                 </fields>
8627                 <links>
8628                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8629                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8630                 </links>
8631         </class>
8632
8633         <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">
8634                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8635                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8636                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8637                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8638                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8639                 </fields>
8640                 <links>
8641                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8642                 </links>
8643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8644                         <actions>
8645                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8646                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8647                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8648                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8649                         </actions>
8650                 </permacrud>
8651         </class>
8652
8653         <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">
8654                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8655                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8656                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8657                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8658                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8659                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8660                 </fields>
8661                 <links>
8662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8663                 </links>
8664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8665                         <actions>
8666                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8667                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8668                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8669                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8670                         </actions>
8671                 </permacrud>
8672         </class>
8673
8674         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8676                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8677                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8678                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8679                 </fields>
8680                 <links>
8681                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8682                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8683                 </links>
8684         </class>
8685
8686         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8687                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8688                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8689                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8690                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8691                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8692                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8693                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8694                 </fields>
8695                 <links>
8696                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8697                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8698                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8699                 </links>
8700         </class>
8701
8702         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8703                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8704                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8705                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8706                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8707                 </fields>
8708                 <links>
8709                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8710                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8711                 </links>
8712         </class>
8713
8714         <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">
8715                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8716                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8717                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8718                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8719                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8720                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8721                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8722                 </fields>
8723                 <links>
8724                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8725                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8727                 </links>
8728         </class>
8729
8730         <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">
8731                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8732                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8733                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8734                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8735                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8736                 </fields>
8737                 <links>
8738                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8739                 </links>
8740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8741             <actions>
8742                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8743                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8744                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8745                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8746             </actions>
8747                 </permacrud>
8748         </class>
8749
8750         <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">
8751                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8752                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8753                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8754                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8755                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8756                 </fields>
8757                 <links>
8758                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8759                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8760                 </links>
8761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8762                         <actions>
8763                                 <create permission="ADMIN_CLAIM_POLICY">
8764                                         <context link="claim_policy" field="org_unit"/>
8765                 </create>
8766                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8767                                         <context link="claim_policy" field="org_unit"/>
8768                 </retrieve>
8769                                 <update permission="ADMIN_CLAIM_POLICY">
8770                                         <context link="claim_policy" field="org_unit"/>
8771                 </update>
8772                                 <delete permission="ADMIN_CLAIM_POLICY">
8773                                         <context link="claim_policy" field="org_unit"/>
8774                 </delete>
8775                         </actions>
8776                 </permacrud>
8777         </class>
8778
8779     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8780         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8781             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8782             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8783             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8784             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8785             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8786             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8787             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8788             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8789             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8790             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8791             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8792             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8793             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8794             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8795             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8796         </fields>
8797     </class>
8798
8799     <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">
8800         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8801             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8802             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8803             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8804             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8805             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8806         </fields>
8807     </class>
8808
8809     <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">
8810         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8811             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8812             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8813             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8814             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8815             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8816             <field reporter:label="City" name="city" reporter:datatype="text"/>
8817             <field reporter:label="State" name="state" reporter:datatype="text"/>
8818             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8819             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8820             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8821         </fields>
8822     </class>
8823
8824     <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">
8825         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8826             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8827             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8828             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8829             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8830             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8831             <field reporter:label="City" name="city" reporter:datatype="text"/>
8832             <field reporter:label="State" name="state" reporter:datatype="text"/>
8833             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8834             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8835             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8836         </fields>
8837     </class>
8838
8839     <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">
8840         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8841             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8842             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8843             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8844             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8845             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8846             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8847         </fields>
8848     </class>
8849
8850         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8851                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8852                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8853                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8854                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8855                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8856                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8857                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8858                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8859                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8860                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8861                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8862                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8863                 </fields>
8864                 <links>
8865                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8866                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8867                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8868                 </links>
8869         </class>
8870
8871         <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">
8872                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8873                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8874                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8875                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8876                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8877                 </fields>
8878                 <links>
8879                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8880                 </links>
8881         </class>
8882
8883     <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">
8884         <fields>
8885             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8886             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8887             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8888         </fields>
8889                 <links>
8890                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8891                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8892                 </links>
8893     </class>
8894
8895     <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">
8896         <fields>
8897             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8898             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8899         </fields>
8900                 <links>
8901                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8902                 </links>
8903     </class>
8904
8905     <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">
8906         <fields>
8907             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8908             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8909             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8910         </fields>
8911                 <links>
8912                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8913                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8914                 </links>
8915     </class>
8916
8917     <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">
8918         <fields>
8919             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8920             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8921         </fields>
8922                 <links>
8923                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8924                 </links>
8925     </class>
8926
8927     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8928                 <oils_persist:source_definition>
8929
8930             SELECT  DISTINCT l.*
8931               FROM  action.unfulfilled_hold_loops l
8932                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8933               WHERE l.count = m.max
8934
8935                 </oils_persist:source_definition>
8936         <fields>
8937             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8938             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8939             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8940         </fields>
8941                 <links>
8942                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8943                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8944                 </links>
8945     </class>
8946
8947         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8948                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8949                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8950                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8951                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8952                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8953                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8954                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8955                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8956                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8957                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8958                 </fields>
8959                 <links>
8960                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8961                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8962                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8963                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8964                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8965                 </links>
8966         </class>
8967
8968         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8969                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8970                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8971                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8972                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8973                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8974                 </fields>
8975                 <links>
8976                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8977                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8978                 </links>
8979         </class>
8980
8981         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8982                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8983                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8984                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8985                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8986                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8987                 </fields>
8988                 <links>
8989                 </links>
8990         </class>
8991
8992         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8993                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8994                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8995                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8996                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8997                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8998                 </fields>
8999                 <links>
9000                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9001                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9002                 </links>
9003         </class>
9004         
9005         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9006                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9007                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9008                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9009                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9010                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9011                 </fields>
9012                 <links>
9013                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9014                 </links>
9015         </class>
9016         
9017         <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">
9018                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9019                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9020                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9021                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9022                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9023                 </fields>
9024                 <links>
9025                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9026                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9027                 </links>
9028         </class>
9029
9030         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9031                 <fields oils_persist:primary="name">
9032                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9033                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9034                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9035                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9036                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9037                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9038                 </fields>
9039                 <links>
9040                 </links>
9041         </class>
9042
9043         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9044                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9045                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9046                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9047                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9048                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9049                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9050                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9051                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9052                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9053                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9054                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9055                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9056                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9057                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9058                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9059                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9060                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9061                 </fields>
9062                 <links>
9063                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9064                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9065                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9066                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9067                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9068                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9069                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9070                 </links>
9071         </class>
9072
9073         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9074                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9075                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9076                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9077                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9078                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9079                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9080                 </fields>
9081                 <links>
9082                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9083                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9084                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9085                 </links>
9086         </class>
9087
9088         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9089                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9090                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9091                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9092                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9093                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9094                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9095                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9096                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9097                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9098                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9099                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9100                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9101                 </fields>
9102                 <links>
9103                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9104                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9105                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9106                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9107                 </links>
9108         </class>
9109
9110         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9111                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9112                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9113                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9115                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9116                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9117                 </fields>
9118                 <links>
9119                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9120                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9121                 </links>
9122         </class>
9123
9124         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9125                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9126                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9127                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9128                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9129                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9130                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9131                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9132                 </fields>
9133                 <links>
9134                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9135                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9136                 </links>
9137         </class>
9138
9139         <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">
9140                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9141                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9142                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9143                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9144                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9145                 </fields>
9146                 <links>
9147                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9148                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9149                 </links>
9150         </class>
9151
9152         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9153                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9154                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9155                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9156                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9157                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9158                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9159                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9160                 </fields>
9161                 <links>
9162                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9163                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9164                 </links>
9165         </class>
9166
9167         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9168                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9169                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9170                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9171                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9172                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9173                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9174                 </fields>
9175                 <links>
9176                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9177                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9178                 </links>
9179         </class>
9180
9181         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9182                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9183                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9184                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9185                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9186                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9187                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9188                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9189                 </fields>
9190                 <links>
9191                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9192                 </links>
9193         </class>
9194
9195         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9196                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9197                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9198                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9199                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9200                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9201                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9202                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9203                 </fields>
9204                 <links>
9205                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9206                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9207                 </links>
9208         </class>
9209
9210         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9211                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9212                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9213                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9214                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9215                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9216                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9217                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9218                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9219                 </fields>
9220                 <links>
9221                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9222                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9223                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9224                 </links>
9225         </class>
9226
9227         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9228                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9229                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9230                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9231                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9232                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9233                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9234                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9235                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9236                 </fields>
9237                 <links>
9238                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9239                 </links>
9240         </class>
9241
9242         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9243                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9244                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9245                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9246                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9247                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9248                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9249                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9250                 </fields>
9251                 <links>
9252                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9253                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9254                 </links>
9255         </class>
9256
9257         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9258                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9259                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9260                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9261                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9262                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9263                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9264                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9265                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9266                 </fields>
9267                 <links>
9268                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9269                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9270                 </links>
9271         </class>
9272
9273         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9274                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9275                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9276                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9277                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9278                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9279                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9280                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9281                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9282                 </fields>
9283                 <links>
9284                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9285                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9286                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9287                 </links>
9288         </class>
9289
9290         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9291                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9292                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9293                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9294                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9295                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9296                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9297                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9298                 </fields>
9299                 <links>
9300                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9301                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9302                 </links>
9303         </class>
9304
9305         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9306                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9307                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9308                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9309                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9310                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9311                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9312                 </fields>
9313                 <links>
9314                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9315                 </links>
9316         </class>
9317
9318         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9319                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9320                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9321                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9322                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9323                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9324                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9325                 </fields>
9326                 <links>
9327                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9328                 </links>
9329         </class>
9330
9331         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9332                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9333                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9334                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9335                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9336                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9337                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9338                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9339                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9340                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9341                 </fields>
9342                 <links>
9343                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9344                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9345                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9346                 </links>
9347         </class>
9348
9349         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9350                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9351                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9352                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9353                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9354                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9355                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9356                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9357                 </fields>
9358                 <links>
9359                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9360                 </links>
9361         </class>
9362
9363         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9364                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9365                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9366                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9367                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9368                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9369                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9370                 </fields>
9371                 <links>
9372                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9373                 </links>
9374         </class>
9375
9376         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9377                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9378                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9379                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9380                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9381                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9382                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9383                 </fields>
9384                 <links>
9385                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9386                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9387                 </links>
9388         </class>
9389
9390         <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">
9391                 <fields oils_persist:primary="id">
9392                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9393                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9394                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9395                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9396                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9397                 </fields>
9398                 <links>
9399                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9400                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9401                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9402                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9403                 </links>
9404         </class>
9405
9406         <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">
9407                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9408                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9409                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9410                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9411                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9412                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9413                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9414                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9415                 </fields>
9416                 <links/>
9417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9418                         <actions>
9419                                 <retrieve/>
9420                         </actions>
9421                 </permacrud>
9422         </class>
9423
9424         <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">
9425                 <fields oils_persist:primary="ptype_key">
9426                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9427                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9428                 </fields>
9429                 <links/>
9430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9431                         <actions>
9432                                 <retrieve/>
9433                         </actions>
9434                 </permacrud>
9435         </class>
9436
9437         <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">
9438                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9439                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9440                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9441                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9442                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9443                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9444                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9445                 </fields>
9446                 <links>
9447                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9448                 </links>
9449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9450                         <actions>
9451                                 <retrieve/>
9452                         </actions>
9453                 </permacrud>
9454         </class>
9455
9456         <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">
9457                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9459                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9460                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9461                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9462                 </fields>
9463                 <links>
9464                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9465                 </links>
9466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9467                         <actions>
9468                                 <retrieve/>
9469                         </actions>
9470                 </permacrud>
9471         </class>
9472
9473     <class
9474         id="uvs"
9475         controller="open-ils.cstore open-ils.pcrud"
9476         oils_obj:fieldmapper="url_verify::session"
9477         oils_persist:tablename="url_verify.session"
9478         reporter:label="URL Verification Session"
9479     >
9480         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9481             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9482             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9483                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9484             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9485             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9486             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9487             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9488             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9489             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9490         </fields>
9491
9492         <links>
9493             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9494             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9495             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9496             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9497             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9498         </links>
9499
9500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9501             <actions>
9502                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9503             </actions>
9504         </permacrud>
9505
9506     </class>
9507
9508     <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">
9509         <oils_persist:source_definition>
9510             SELECT
9511                 cbrebi.id AS id,  -- so we can have a pkey in our view
9512                 uvs.id AS session,
9513                 uvs.owning_lib,
9514                 cbrebi.target_biblio_record_entry
9515             FROM url_verify.session uvs
9516             JOIN container.biblio_record_entry_bucket cbreb
9517                 ON (uvs.container = cbreb.id)
9518             JOIN container.biblio_record_entry_bucket_item cbrebi
9519                 ON (cbrebi.bucket = cbreb.id)
9520         </oils_persist:source_definition>
9521         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9522             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9523             <field reporter:label="Session" name="session" reporter:datatype="link" />
9524             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9525             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9526         </fields>
9527         <links>
9528             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9529             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9530             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9531         </links>
9532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9533             <actions>
9534                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9535             </actions>
9536         </permacrud>
9537     </class>
9538
9539     <class
9540         id="uvus"
9541         controller="open-ils.cstore open-ils.pcrud"
9542         oils_obj:fieldmapper="url_verify::url_selector"
9543         oils_persist:tablename="url_verify.url_selector"
9544         reporter:label="URL Verification URL Selector"
9545     >
9546         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9547             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9548             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9549                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9550             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9551         </fields>
9552
9553         <links>
9554             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9555             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9556         </links>
9557
9558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9559             <actions>
9560                 <create permission="URL_VERIFY">
9561                     <context link="session" field="owning_lib"/>
9562                 </create>
9563                 <retrieve permission="URL_VERIFY">
9564                     <context link="session" field="owning_lib"/>
9565                 </retrieve>
9566                 <update permission="URL_VERIFY">
9567                     <context link="session" field="owning_lib"/>
9568                 </update>
9569                 <delete permission="URL_VERIFY">
9570                     <context link="session" field="owning_lib"/>
9571                 </delete>
9572             </actions>
9573         </permacrud>
9574
9575     </class>
9576
9577     <class
9578         id="uvu"
9579         controller="open-ils.cstore open-ils.pcrud"
9580         oils_obj:fieldmapper="url_verify::url"
9581         oils_persist:tablename="url_verify.url"
9582         reporter:label="URL Verification URL"
9583     >
9584         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9585             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9586                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9587                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9588                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9589                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9590             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9591             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9592             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9593             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9594             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9595             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9596             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9597             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9598             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9599             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9600             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9601             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9602             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9603         </fields>
9604
9605         <links>
9606             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9607             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9608             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9609             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9610             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9611         </links>
9612
9613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9614             <actions>
9615                 <create permission="URL_VERIFY">
9616                     <context link="session" field="owning_lib"/>
9617                 </create>
9618                 <retrieve permission="URL_VERIFY">
9619                     <context link="session" field="owning_lib"/>
9620                 </retrieve>
9621                 <update permission="URL_VERIFY">
9622                     <context link="session" field="owning_lib"/>
9623                 </update>
9624                 <delete permission="URL_VERIFY">
9625                     <context link="session" field="owning_lib"/>
9626                 </delete>
9627             </actions>
9628         </permacrud>
9629
9630     </class>
9631
9632     <class
9633         id="uvva"
9634         controller="open-ils.cstore open-ils.pcrud"
9635         oils_obj:fieldmapper="url_verify::verification_attempt"
9636         oils_persist:tablename="url_verify.verification_attempt"
9637         reporter:label="URL Verification Attempt"
9638     >
9639         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9640             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9641                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9642                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9643             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9644             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9645         </fields>
9646
9647         <links>
9648             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9649             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9650         </links>
9651
9652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9653             <actions>
9654                 <create permission="URL_VERIFY">
9655                     <context link="session" field="owning_lib"/>
9656                 </create>
9657                 <retrieve permission="URL_VERIFY">
9658                     <context link="session" field="owning_lib"/>
9659                 </retrieve>
9660                 <update permission="URL_VERIFY">
9661                     <context link="session" field="owning_lib"/>
9662                 </update>
9663                 <delete permission="URL_VERIFY">
9664                     <context link="session" field="owning_lib"/>
9665                 </delete>
9666             </actions>
9667         </permacrud>
9668
9669     </class>
9670
9671     <class
9672         id="uvuv"
9673         controller="open-ils.cstore open-ils.pcrud"
9674         oils_obj:fieldmapper="url_verify::url_verification"
9675         oils_persist:tablename="url_verify.url_verification"
9676         reporter:label="URL Verification"
9677     >
9678         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9679             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9680                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9681                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9682             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9683             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9684             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9685             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9686                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9687         </fields>
9688
9689         <links>
9690             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9691             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9692             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9693         </links>
9694
9695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9696             <actions>
9697                 <create permission="URL_VERIFY">
9698                     <context link="attempt" jump="session" field="owning_lib"/>
9699                 </create>
9700                 <retrieve permission="URL_VERIFY">
9701                     <context link="attempt" jump="session" field="owning_lib"/>
9702                 </retrieve>
9703                 <update permission="URL_VERIFY">
9704                     <context link="attempt" jump="session" field="owning_lib"/>
9705                 </update>
9706                 <delete permission="URL_VERIFY">
9707                     <context link="attempt" jump="session" field="owning_lib"/>
9708                 </delete>
9709             </actions>
9710         </permacrud>
9711
9712     </class>
9713
9714         <class
9715                 id="cfdi"
9716                 controller="open-ils.cstore open-ils.pcrud"
9717                 oils_obj:fieldmapper="config::filter_dialog_interface"
9718                 oils_persist:tablename="config.filter_dialog_interface"
9719                 reporter:label="FilterDialog Interface">
9720                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9721                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9722                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9723                 </fields>
9724                 <links>
9725                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9726                 </links>
9727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9728                         <actions>
9729                                 <retrieve />
9730                         </actions>
9731                 </permacrud>
9732         </class>
9733
9734         <class
9735                 id="cfdfs"
9736                 controller="open-ils.cstore open-ils.pcrud"
9737                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9738                 oils_persist:tablename="config.filter_dialog_filter_set"
9739                 reporter:label="FilterDialog Filter Set">
9740                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9741                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9742                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9743                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9744                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9745                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9746                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9747                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9748                 </fields>
9749                 <links>
9750                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9751                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9752                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9753                 </links>
9754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9755                         <actions>
9756                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9757                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9758                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9759                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9760                         </actions>
9761                 </permacrud>
9762
9763         </class>
9764
9765         <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">
9766                 <fields oils_persist:primary="code">
9767                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9768                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9769                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9770                 </fields>
9771                 <links/>
9772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9773                         <actions>
9774                                 <retrieve/>
9775                         </actions>
9776                 </permacrud>
9777         </class>
9778
9779         <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">
9780                 <oils_persist:source_definition>
9781
9782             SELECT  b.id,
9783                     MAX(dcp.edit_date) AS last_delete_date
9784              FROM   biblio.record_entry b
9785                     JOIN asset.call_number cn ON (cn.record = b.id)
9786                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9787              WHERE  NOT b.deleted
9788              GROUP BY b.id
9789              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9790
9791                 </oils_persist:source_definition>
9792                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9793                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9794                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9795                 </fields>
9796                 <links>
9797                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9798                 </links>
9799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9800                         <actions>
9801                                 <retrieve/>
9802                         </actions>
9803                 </permacrud>
9804         </class>
9805
9806         <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">
9807                 <oils_persist:source_definition>
9808
9809             -- -- 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.
9810             -- -- 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
9811             -- -- may not.
9812             -- SELECT
9813             --     bre.id AS "bib_id",
9814             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9815             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9816             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9817             -- FROM (
9818                 SELECT
9819                     y.bre AS "id",
9820                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9821                     y.hold_count AS "hold_count",
9822                     (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"
9823                 FROM (
9824                         SELECT
9825                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9826                             COUNT(*) AS "hold_count"
9827                         FROM action.hold_request h
9828                         WHERE
9829                             cancel_time IS NULL
9830                             AND fulfillment_time IS NULL
9831                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9832                         GROUP BY 1
9833                     )y LEFT JOIN (
9834                         SELECT 
9835                             (SELECT id
9836                                 FROM biblio.record_entry 
9837                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9838                             ) AS "bre", 
9839                             COUNT(*) AS "copy_count"
9840                         FROM asset.copy
9841                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9842                         WHERE copy.holdable 
9843                             AND NOT copy.deleted 
9844                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9845                         GROUP BY 1
9846                     )x ON x.bre = y.bre
9847                 -- )z RIGHT JOIN (
9848                 --     SELECT id
9849                 --     FROM biblio.record_entry
9850                 --     WHERE NOT deleted
9851                 -- )bre ON (z.bib_id = bre.id)
9852                 
9853
9854                 </oils_persist:source_definition>
9855                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9856                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9857                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9858                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9859                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9860                 </fields>
9861                 <links>
9862                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9863                 </links>
9864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9865                         <actions>
9866                                 <retrieve/>
9867                         </actions>
9868                 </permacrud>
9869         </class>
9870
9871         <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">
9872                 <oils_persist:source_definition>
9873             SELECT *,
9874                 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,
9875                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9876             FROM
9877                 (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
9878                     FROM
9879                         action.hold_request ahr
9880                         JOIN reporter.hold_request_record rhrr USING (id)
9881                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9882                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9883                     WHERE
9884                         ahr.cancel_time IS NULL
9885                         AND ahr.fulfillment_time IS NULL
9886                     GROUP BY bib_record, pickup_lib
9887                 )x
9888                 JOIN
9889                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9890                     FROM
9891                         action.hold_request ahr
9892                         JOIN reporter.hold_request_record rhrr USING (id)
9893                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9894                     WHERE
9895                         ahr.cancel_time IS NULL
9896                         AND ahr.fulfillment_time IS NULL
9897                     GROUP BY bib_record
9898                 )y
9899                 USING (id)
9900                 </oils_persist:source_definition>
9901                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9902                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9903                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9904                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9905                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9906                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9907                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9908                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9909                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9910                 </fields>
9911                 <links>
9912                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9913                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9914                 </links>
9915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9916                         <actions>
9917                                 <retrieve/>
9918                         </actions>
9919                 </permacrud>
9920         </class>
9921
9922         <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">
9923                 <oils_persist:source_definition>
9924             SELECT
9925                 ac.id,
9926                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9927                 MAX(actac.xact_start) AS last_circ
9928             FROM asset.copy ac
9929                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9930             GROUP BY ac.id
9931
9932             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9933             --SELECT
9934             --    ac.id,
9935             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9936             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9937             --FROM asset.copy ac
9938             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9939             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9940             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9941                 </oils_persist:source_definition>
9942                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9943                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9944                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9945                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9946                 </fields>
9947                 <links>
9948                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9949                 </links>
9950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9951                         <actions>
9952                                 <retrieve/>
9953                         </actions>
9954                 </permacrud>
9955         </class>
9956
9957         <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">
9958                 <fields oils_persist:primary="id">
9959                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
9960                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
9961                 </fields>
9962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9963                         <actions>
9964                                 <retrieve/>
9965                         </actions>
9966                 </permacrud>
9967         </class>
9968
9969         <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">
9970                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
9971                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9972                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
9973                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9974                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9975                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9976                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9977                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9978                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
9979                 </fields>
9980                 <links>
9981                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
9982                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9983                 </links>
9984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9985                         <actions>
9986                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9987                                 <retrieve/>
9988                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9989                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9990                         </actions>
9991                 </permacrud>
9992         </class>
9993
9994         <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">
9995                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
9996                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9997                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
9998                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9999                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10000                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10001                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10002                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10003                 </fields>
10004                 <links>
10005                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10006                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10007                 </links>
10008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10009                         <actions>
10010                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10011                                 <retrieve/>
10012                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10013                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10014                         </actions>
10015                 </permacrud>
10016         </class>
10017
10018
10019         <!-- ********************************************************************************************************************* -->
10020         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10021         <!-- ********************************************************************************************************************* -->
10022         <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">
10023                 <fields oils_persist:primary="id">
10024                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10025                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10026                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10027                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10028                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10029                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10030                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10031                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10032                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10033                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10034                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10035                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10036                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10037                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10038                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10039                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10040                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10041                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10042                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10043                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10044                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10045                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10046                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10047                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10048                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10049                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10050                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10051                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10052                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10053                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10054                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10055                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10056                 </fields>
10057                 <links>
10058                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10059                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10060                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10061                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10062                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10063                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10064                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10065                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10066                 </links>
10067         </class>
10068
10069         <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">
10070                 <fields oils_persist:primary="id">
10071                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10072                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10073                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10074                 </fields>
10075                 <links>
10076                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10077                 </links>
10078         </class>
10079
10080         <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">
10081                 <fields oils_persist:primary="id">
10082                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10083                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10084                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10085                 </fields>
10086                 <links>
10087                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10088                 </links>
10089         </class>
10090
10091         <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">
10092                 <fields oils_persist:primary="id">
10093                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10094
10095                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10096                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10097                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10098
10099                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10100                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10101                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10102
10103                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10104                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10105
10106                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10107                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10108                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10109
10110                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10111                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10112
10113                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10114                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10115                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10116
10117                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10118                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10119                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10120
10121                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10122                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10123                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10124                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10125
10126                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10127                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10128
10129                 </fields>
10130                 <links>
10131                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10132                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10133                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10134                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10135                 </links>
10136         </class>
10137
10138         <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">
10139                 <oils_persist:source_definition>
10140
10141             SELECT
10142                 po.ordering_agency AS ordering_agency,
10143                 po.id AS purchase_order,
10144                 li.id AS lineitem,
10145                 lid.id AS lineitem_detail,
10146                 cpa.id AS claim_policy_action
10147             FROM
10148                 acq.lineitem_detail lid
10149                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10150                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10151                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10152                 JOIN acq.claim_policy_action cpa ON (
10153                     cpa.claim_policy = cp.id
10154
10155                     -- we only care about claim policy actions whose claim
10156                     -- interval we'd reached or exceeded
10157                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10158
10159                     -- filter out all claim policy actions where claim events
10160                     -- have occurred on or after the action's action_interval
10161                     AND NOT EXISTS (
10162                         SELECT 1
10163                         FROM
10164                             acq.claim_event evt
10165                             JOIN acq.claim claim ON (
10166                                 claim.id = evt.claim
10167                                 AND claim.lineitem_detail = lid.id
10168                             )
10169                         WHERE
10170                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10171                     )
10172                 )
10173             WHERE
10174                 lid.cancel_reason IS NULL
10175                 AND li.cancel_reason IS NULL -- belt/suspenders
10176                 AND po.cancel_reason IS NULL -- belt/suspenders
10177                 AND lid.recv_time IS NULL
10178                 AND po.state = 'on-order'
10179             ORDER BY 1, 2, 3, 4, 5
10180
10181                 </oils_persist:source_definition>
10182                 <fields>
10183                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10184                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10185                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10186                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10187                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10188                 </fields>
10189                 <links>
10190                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10191                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10192                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10193                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10194                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10195                 </links>
10196         </class>
10197         <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">
10198                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10199                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10200                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10201                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10202                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10203                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10204                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10205                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10206                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10207                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10208                 </fields>
10209                 <links>
10210                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10211                 </links>
10212     </class>
10213         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10214                 <oils_persist:source_definition>
10215             SELECT * FROM acq.lineitem_summary 
10216                                 WHERE item_count > (invoice_count + cancel_count)
10217         </oils_persist:source_definition>
10218                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10219                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10220                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10221                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10222                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10223                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10224                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10225                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10226                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10227                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10228                 </fields>
10229                 <links>
10230                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10231                 </links>
10232     </class>
10233         <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">
10234                 <oils_persist:source_definition>
10235
10236                         SELECT  t.*
10237                           FROM  action.transit_copy t
10238                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10239                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10240                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10241
10242                 </oils_persist:source_definition>
10243                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10244                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10245                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10246                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10247                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10248                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10249                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10250                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10251                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10252                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10253                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10254                 </fields>
10255                 <links>
10256                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10257                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10258                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10259                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10260                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10261                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10262                 </links>
10263         </class>
10264
10265     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10266                 <oils_persist:source_definition>
10267
10268         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10269                 SELECT
10270                         cp.id as copy,
10271                         COUNT(circ.id),
10272                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10273                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10274                 FROM
10275                         asset.copy cp
10276                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10277                 GROUP BY 1, 3, 4
10278                 UNION
10279                 SELECT
10280                         cp.id as copy,
10281                         COUNT(circ.id),
10282                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10283                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10284                 FROM
10285                         asset.copy cp
10286                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10287                 GROUP BY 1, 3, 4
10288                 UNION
10289                 SELECT
10290                         id as copy,
10291                         circ_count,
10292                         -1 AS year,
10293                         false as is_renewal
10294                 FROM
10295                         extend_reporter.legacy_circ_count
10296         )x GROUP BY 1, 3, 4
10297
10298                 </oils_persist:source_definition>
10299         <fields>
10300             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10301             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10302             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10303             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10304         </fields>
10305                 <links>
10306                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10307                 </links>
10308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10309                         <actions>
10310                                 <retrieve/>
10311                         </actions>
10312                 </permacrud>
10313     </class>
10314
10315         <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">
10316                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10317                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10318                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10319                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10320                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10321                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10322                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10323                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10324                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10325                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10326                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10327                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10328                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10329                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10330                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10331                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10332                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10333                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10334                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10335                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10336                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10337                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10338                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10339                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10340                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10341                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10342                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10343                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10344                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10345                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10346                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10347                 </fields>
10348                 <links>
10349                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10350                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10351                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10352                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10353                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10354                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10355                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10356                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10357                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10358                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10359                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10360                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10361                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10362                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10363                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10364                 </links>
10365         </class>
10366
10367     <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">
10368         <fields oils_persist:primary="id">
10369             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10370             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10371             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10372             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10373             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10374             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10375             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10376             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10377             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10378             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10379             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10380             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10381             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10382             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10383             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10384             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10385             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10386             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10387             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10388             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10389             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10390             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10391             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10392             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10393             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10394             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10395             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10396             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10397             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10398             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10399             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10400             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10401             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10402             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10403         </fields>
10404         <links>
10405             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10406             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10407             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10408             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10409             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10410         </links>
10411     </class>
10412
10413     <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">
10414         <fields oils_persist:primary="id">
10415             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10416             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10417             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10418             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10419         </fields>
10420         <links>
10421             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10422             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10423         </links>
10424     </class>
10425
10426     <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">
10427         <fields oils_persist:primary="owning_lib">
10428             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10429             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10430             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10431         </fields>
10432         <links>
10433             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10434         </links>
10435     </class>
10436
10437     <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">
10438         <fields oils_persist:primary="id">
10439             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10440             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10441             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10442             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10443             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10444         </fields>
10445         <links>
10446             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10447             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10448             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10449         </links>
10450     </class>
10451
10452     <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">
10453         <fields oils_persist:primary="circ_lib">
10454             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10455             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10456             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10457             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10458         </fields>
10459         <links>
10460             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10461             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10462         </links>
10463     </class>
10464
10465     <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">
10466         <fields oils_persist:primary="id">
10467             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10468             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10469             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10470             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10471             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10472         </fields>
10473         <links>
10474             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10475             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10476             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10477         </links>
10478     </class>
10479
10480     <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">
10481         <fields oils_persist:primary="home_ou">
10482             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10483             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10484             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10485             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10486         </fields>
10487         <links>
10488             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10489             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10490         </links>
10491     </class>
10492         <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">
10493                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10494                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10495                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10496                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10497                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10498                 </fields>
10499                 <links>
10500                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10501                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10502                 </links>
10503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10504                         <actions>
10505                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10506                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10507                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10508                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10509                         </actions>
10510                 </permacrud>
10511         </class>
10512         <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">
10513                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10514                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10515                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10516                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10517                 </fields>
10518                 <links>
10519                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10520                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10521                         </links>
10522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10523                 <actions>
10524                                 <create permission="ADMIN_ACQ_FUND_TAG">
10525                                         <context link="tag" field="owner"/>
10526                                 </create>
10527                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10528                                         <context link="tag" field="owner"/>
10529                                 </retrieve>
10530                                 <update permission="ADMIN_ACQ_FUND_TAG">
10531                                         <context link="tag" field="owner"/>
10532                                 </update>
10533                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10534                                         <context link="tag" field="owner"/>
10535                                 </delete>
10536                         </actions>
10537                 </permacrud>
10538         </class>
10539         <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">
10540                 <oils_persist:source_definition><![CDATA[
10541                 SELECT
10542                         poi.purchase_order AS purchase_order,
10543                         ii.invoice AS invoice,
10544                         NULL AS lineitem,
10545                         poi.id AS po_item,
10546                         NULL AS picklist
10547                 FROM
10548                         acq.po_item poi
10549                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10550                 UNION SELECT
10551                         jub.purchase_order AS purchase_order,
10552                         ie.invoice AS invoice,
10553                         jub.id AS lineitem,
10554                         NULL AS po_item,
10555                         jub.picklist AS picklist
10556                 FROM
10557                         acq.lineitem jub
10558                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10559                 UNION SELECT
10560                         ii.purchase_order AS purchase_order,
10561                         ii.invoice AS invoice,
10562                         NULL AS lineitem,
10563                         NULL AS po_item,
10564                         NULL AS picklist
10565                 FROM
10566                         acq.invoice_item ii
10567                 WHERE ii.po_item IS NULL
10568                 UNION SELECT
10569                         ie.purchase_order AS purchase_order,
10570                         ie.invoice AS invoice,
10571                         NULL AS lineitem,
10572                         NULL AS po_item,
10573                         NULL AS picklist
10574                 FROM
10575                         acq.invoice_entry ie
10576                 WHERE ie.lineitem IS NULL
10577                 UNION SELECT
10578                         NULL AS purchase_order,
10579                         NULL AS invoice,
10580                         jub.id AS lineitem,
10581                         NULL AS po_item,
10582                         jub.picklist AS picklist
10583                 FROM
10584                         acq.lineitem jub
10585                 WHERE jub.purchase_order IS NULL
10586                 ]]></oils_persist:source_definition>
10587                 <fields>
10588                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10589                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10590                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10591                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10592                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10593                 </fields>
10594                 <links>
10595                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10596                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10597                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10598                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10599                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10600                 </links>
10601         </class>
10602         <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">
10603                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10604                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10605                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10606                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10607                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10608                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10609                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10610                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10611                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10612                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10613                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10614                 </fields>
10615                 <links>
10616                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10617                 </links>
10618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10619                         <actions>
10620                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10621                                 <retrieve/>
10622                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10623                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10624                         </actions>
10625                 </permacrud>
10626         </class>
10627
10628         <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">
10629                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10630                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10631                         <field name="date_applied" reporter:datatype="timestamp"/>
10632                         <field name="org" reporter:datatype="org_unit"/>
10633                         <field name="original_value" reporter:datatype="text"/>
10634                         <field name="new_value" reporter:datatype="text"/>
10635                         <field name="field_name" reporter:datatype="link"/>
10636                 </fields>
10637                 <links>
10638                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10639                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10640                 </links>
10641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10642                         <actions>
10643                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10644                                 <retrieve/>
10645                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10646                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10647                         </actions>
10648                 </permacrud>
10649         </class>
10650         <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">
10651                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10652                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10653                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10654                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10655                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10656                 </fields>
10657                 <links>
10658                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10659                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10660                 </links>
10661         </class>
10662         <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">
10663                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10664                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10665                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10666                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10667                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10668                 </fields>
10669                 <links>
10670                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10671                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10672                 </links>
10673         </class>
10674
10675
10676         <!-- ********************************************************************************************************************* -->
10677
10678 </IDL>
10679
10680 <!--
10681     vim:noet:ts=4:sw=4:
10682 -->