]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
7ae11f2137962bdff67b1217b3173a312e0fa301
[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/>
231                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </update>
234                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </delete>
237                         </actions>
238                 </permacrud>
239         </class>
240
241         <class  id="vibtg" 
242             controller="open-ils.cstore open-ils.pcrud" 
243             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
244             oils_persist:tablename="vandelay.import_bib_trash_group" 
245             reporter:label="Import/Overlay Field Groups for Removal">
246                 <fields oils_persist:primary="id" 
247                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
249                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
251                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
252                 </fields>
253                 <links>
254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
255                 </links>
256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
257                         <actions>
258                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
259                                 <retrieve/>
260                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266
267         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
268                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
269                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
270                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
271                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
272                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
273                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
274                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
275                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
276                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
277                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
278                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
279                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
280                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
281                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
282                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
283                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
285                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
286                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
287                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
289                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
290                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
291                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
292                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
293                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
294                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
295                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
296                 </fields>
297                 <links>
298                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
299                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
300                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
302                 </links>
303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
304                         <actions>
305                                 <create permission="CREATE_IMPORT_ITEM">
306                     <context link="definition" field="owner"/>
307                                 </create>
308                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
309                     <context link="definition" field="owner"/>
310                                 </retrieve>
311                                 <update permission="UPDATE_IMPORT_ITEM">
312                     <context link="definition" field="owner"/>
313                                 </update>
314                                 <delete permission="DELETE_IMPORT_ITEM">
315                     <context link="definition" field="owner"/>
316                                 </delete>
317                         </actions>
318                 </permacrud>
319         </class>
320
321         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
322                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
323                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
324                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
325                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
326                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
327                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
328                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
329                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
330                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
331                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
332                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
333                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
334                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
336                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
337                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
338                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
340                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
341                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
343                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
344                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
346                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
347                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
355                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
356                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
364                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
365                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
367                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
368                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
369                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
370                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
371                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
372                 </fields>
373                 <links>
374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
375                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
376                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
377                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </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" reporter:selector="label"/>
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="name" 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="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1142                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1143                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1144                 </fields>
1145                 <links>
1146                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1147                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1148                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1149                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1150                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1151                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1152                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1153                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1154                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1155                 </links>
1156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157                         <actions>
1158                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1159                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1162                         </actions>
1163                 </permacrud>
1164         </class>
1165
1166         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1167                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1168                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1169                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1170                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1171                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1172                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1176                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1177                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1178                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1179                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1180                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1181                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1182                 </fields>
1183                 <links>
1184                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1185                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1186                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1188                 </links>
1189         </class>
1190
1191         <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">
1192                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1193                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1194                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1195                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1196                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1197                 </fields>
1198                 <links>
1199                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1200                 </links>
1201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1202                         <actions>
1203                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1204                     <context link="event_def" field="owner"/>
1205                 </create>
1206                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1207                     <context link="event_def" field="owner"/>
1208                 </retrieve>
1209                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1210                     <context link="event_def" field="owner"/>
1211                 </update>
1212                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1213                     <context link="event_def" field="owner"/>
1214                 </delete>
1215                         </actions>
1216                 </permacrud>
1217         </class>
1218
1219         <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">
1220                 <oils_persist:source_definition><![CDATA[
1221                 SELECT  atevdef.hook,
1222                         atevdef.name,
1223                         atevdef.reactor,
1224                         atev.id,
1225                         atev.event_def,
1226                         atev.add_time,
1227                         atev.run_time,
1228                         atev.start_time,
1229                         atev.update_time,
1230                         atev.complete_time,
1231                         atev.update_process,
1232                         atev.state,
1233                         atev.user_data,
1234                         atev.template_output,
1235                         atev.error_output,
1236                         atev.async_output,
1237                         targ_circ.id AS target_circ,
1238                         targ_ahr.id AS target_hold,
1239                         COALESCE(
1240                                 targ_circ.circ_lib,
1241                                 targ_ahr.pickup_lib
1242                         ) AS perm_lib
1243                 FROM action_trigger.event atev
1244                 JOIN action_trigger.event_definition atevdef ON
1245                         (atevdef.id = atev.event_def)
1246                 JOIN action_trigger.hook ath ON
1247                         (ath.key = atevdef.hook)
1248                 LEFT JOIN action.circulation targ_circ ON
1249                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1250                 LEFT JOIN action.hold_request targ_ahr ON
1251                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1252                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1253                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1254                                 'circ.staff.max_visible_event_age',
1255                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1256                         ) UNION
1257                         SELECT '1000 YEARS'::INTERVAL AS value
1258                 ) ous)
1259                 ]]></oils_persist:source_definition>
1260                 <fields oils_persist:primary="id">
1261                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1262                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1263                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1264                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1265                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1266                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1267                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1271                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1272                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1273                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1274                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1275                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1276                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1277                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1278                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1279                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1280                 </fields>
1281                 <links>
1282                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1283                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1284                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1286                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1287                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1288                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1289                 </links>
1290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1291                         <actions>
1292                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1298                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1299                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1300                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1301                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1302                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1303                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1304                 </fields>
1305                 <links>
1306                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1307                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1308                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1309                 </links>
1310         </class>
1311
1312         <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">
1313                 <fields oils_persist:primary="code">
1314                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1315                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1316                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1318                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1319                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1320                 </fields>
1321                 <links/>
1322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1323             <actions>
1324                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1325                 <retrieve/>
1326                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1327                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1328             </actions>
1329         </permacrud>
1330         </class>
1331
1332         <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">
1333                 <fields oils_persist:primary="code">
1334                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1335                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1336                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1337                 </fields>
1338                 <links/>
1339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1340             <actions>
1341                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1342                 <retrieve/>
1343                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1344                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1345             </actions>
1346         </permacrud>
1347         </class>
1348
1349         <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">
1350                 <fields oils_persist:primary="code">
1351                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1352                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356             <actions>
1357                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1358                 <retrieve/>
1359                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1360                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1361             </actions>
1362         </permacrud>
1363         </class>
1364
1365         <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">
1366                 <fields oils_persist:primary="code">
1367                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1368                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372             <actions>
1373                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1374                 <retrieve/>
1375                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1376                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1377             </actions>
1378         </permacrud>
1379         </class>
1380
1381         <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">
1382                 <fields oils_persist:primary="code">
1383                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1384                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388             <actions>
1389                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1390                 <retrieve/>
1391                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1392                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1393             </actions>
1394         </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1399                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1400                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1401                 </fields>
1402                 <links/>
1403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1404             <actions>
1405                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1406                 <retrieve/>
1407                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1408                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1409             </actions>
1410         </permacrud>
1411         </class>
1412
1413         <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">
1414                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1415                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1416                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1417                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1418                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1419                 </fields>
1420         <links>
1421             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1422             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1423             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1424         </links>
1425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1426             <actions>
1427                 <create permission="UPDATE_COPY">
1428                     <context link="target_copy" field="circ_lib"/>
1429                 </create>
1430                 <retrieve/>
1431                 <update permission="UPDATE_COPY">
1432                     <context link="target_copy" field="circ_lib"/>
1433                 </update>
1434                 <delete permission="UPDATE_COPY">
1435                     <context link="target_copy" field="circ_lib"/>
1436                 </delete>
1437             </actions>
1438         </permacrud>
1439         </class>
1440
1441         <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">
1442                 <fields oils_persist:primary="code">
1443                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1444                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1445                 </fields>
1446                 <links/>
1447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1448             <actions>
1449                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1450                 <retrieve/>
1451                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1452                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1453             </actions>
1454         </permacrud>
1455         </class>
1456
1457         <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">
1458                 <fields oils_persist:primary="code">
1459                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1460                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1461                 </fields>
1462                 <links/>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1466                 <retrieve/>
1467                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1468                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1469             </actions>
1470         </permacrud>
1471         </class>
1472
1473         <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">
1474                 <fields oils_persist:primary="code">
1475                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1476                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1477                 </fields>
1478                 <links/>
1479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1480             <actions>
1481                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1482                 <retrieve/>
1483                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1484                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1485             </actions>
1486         </permacrud>
1487         </class>
1488
1489     <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">
1490         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1491             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1492             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1493             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1494             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1495             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1496             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1497             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1498             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1499             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1500             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1501             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1506             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1507             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1508         </fields>
1509         <links/>
1510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1511             <actions>
1512                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1513                 <retrieve/>
1514                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1515                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1516             </actions>
1517         </permacrud>
1518     </class>
1519
1520     <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">
1521         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1522             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1523             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1524             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1525             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1526             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1527             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1528             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1529             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1530             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1531             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1532             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1533             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1534             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1535             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1536             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1537             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1538             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1539             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1540             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1541         </fields>
1542         <links/>
1543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1544             <actions>
1545                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1546                 <retrieve/>
1547                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1548                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1549             </actions>
1550         </permacrud>
1551     </class>
1552
1553     <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">
1554         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1555             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1556             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1557             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1558             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1559             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1560         </fields>
1561         <links>
1562             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1563             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1564             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1565         </links>
1566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1567             <actions>
1568                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1569                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1572             </actions>
1573         </permacrud>
1574     </class>
1575
1576         <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">
1577                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1578                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1579                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1580                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1581                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1582                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1586                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1587                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1588                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1589                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1593                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1594             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1595                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1596                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1597                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1598                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1599                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1600                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1601                 </fields>
1602                 <links>
1603                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1604                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1608                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1609                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1610                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1611                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1612                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1613                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1614                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1615                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1616             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1617                 </links>
1618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1619             <actions>
1620                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1621                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1624             </actions>
1625         </permacrud>
1626         </class>
1627
1628         <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">
1629                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1630                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1631                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1632                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1633                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1634                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1635                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1636                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1637                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1638                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1639                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1640                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1644                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1645             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1646                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1647                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1648             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1649                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1650                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1651                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1652                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1653             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1654             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1655             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1656                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1657                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1658                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1659                 </fields>
1660                 <links>
1661                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1662                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1665                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1666                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1667                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1668                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1669                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1670                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1671                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1672                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1673                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1674                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1675             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1676                 </links>
1677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1678             <actions>
1679                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1680                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1683             </actions>
1684         </permacrud>
1685         </class>
1686
1687     <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">
1688         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1689             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1690             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1691             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1692         </fields>
1693         <links/>
1694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1695             <actions>
1696                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1697                 <retrieve/>
1698                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1699                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1700             </actions>
1701         </permacrud>
1702     </class>
1703
1704     <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">
1705         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1706             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1707             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1708             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1709             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1710             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1711             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1712             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1713         </fields>
1714         <links>
1715             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1716         </links>
1717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1718             <actions>
1719                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1720                 <retrieve/>
1721                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1722                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1723             </actions>
1724         </permacrud>
1725     </class>
1726
1727     <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">
1728         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1729             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1730             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1731             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1732             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1733             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1734         </fields>
1735         <links>
1736             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1737             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1738         </links>
1739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1740             <actions>
1741                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1742                     <context link="matchpoint" field="org_unit"/>
1743                 </create>
1744                 <retrieve/>
1745                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1746                     <context link="matchpoint" field="org_unit"/>
1747                 </update>
1748                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1749                     <context link="matchpoint" field="org_unit"/>
1750                 </delete>
1751             </actions>
1752         </permacrud>
1753     </class>
1754
1755     <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">
1756         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1757             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1758             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1759             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1760         </fields>
1761         <links>
1762             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1763             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1764         </links>
1765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1766             <actions>
1767                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1768                     <context link="limit_set" field="owning_lib"/>
1769                 </create>
1770                 <retrieve/>
1771                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1772                     <context link="limit_set" field="owning_lib"/>
1773                 </update>
1774                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1775                     <context link="limit_set" field="owning_lib"/>
1776                 </delete>
1777             </actions>
1778         </permacrud>
1779     </class>
1780     <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">
1781         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1782             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1783             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1784             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1785         </fields>
1786         <links>
1787             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1788             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1789         </links>
1790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1791             <actions>
1792                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1793                     <context link="limit_set" field="owning_lib"/>
1794                 </create>
1795                 <retrieve/>
1796                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1797                     <context link="limit_set" field="owning_lib"/>
1798                 </update>
1799                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1800                     <context link="limit_set" field="owning_lib"/>
1801                 </delete>
1802             </actions>
1803         </permacrud>
1804     </class>
1805
1806     <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">
1807         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1808             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1809             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1810             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1811             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1812         </fields>
1813         <links>
1814             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1815             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1816         </links>
1817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1818             <actions>
1819                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1820                     <context link="limit_set" field="owning_lib"/>
1821                 </create>
1822                 <retrieve/>
1823                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1824                     <context link="limit_set" field="owning_lib"/>
1825                 </update>
1826                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1827                     <context link="limit_set" field="owning_lib"/>
1828                 </delete>
1829             </actions>
1830         </permacrud>
1831     </class>
1832
1833         <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">
1834                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1835                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1836                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1837                 </fields>
1838                 <links/>
1839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1840             <actions>
1841                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1842                 <retrieve/>
1843                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1844                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1845             </actions>
1846         </permacrud>
1847         </class>
1848
1849         <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">
1850                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1851                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1854                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1855                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1856                 </fields>
1857                 <links>
1858                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1859                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1860                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1861                 </links>
1862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1863             <actions>
1864                 <create permission="ADMIN_SURVEY">
1865                     <context link="survey" field="owner"/>
1866                 </create>
1867                 <retrieve/>
1868                 <update permission="ADMIN_SURVEY">
1869                     <context link="survey" field="owner"/>
1870                 </update>
1871                 <delete permission="ADMIN_SURVEY">
1872                     <context link="survey" field="owner"/>
1873                 </delete>
1874             </actions>
1875         </permacrud>
1876         </class>
1877         <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">
1878                 <fields oils_persist:primary="id" oils_persist:sequence="">
1879                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1880                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1881                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1882                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1883                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1884                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1885                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1886                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1887                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1888                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1889                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1890                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1891                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1892                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1893                 </fields>
1894                 <links>
1895                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1896                 </links>
1897         </class>
1898         <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">
1899                 <fields oils_persist:primary="id" oils_persist:sequence="">
1900                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1901                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1902                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1903                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1904                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1905                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1906                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1907                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1908                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1909                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1910                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1911                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1912                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1913                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1914                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1915                 </fields>
1916                 <links>
1917                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1918                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1919                 </links>
1920         </class>
1921         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1922                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1923                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1924                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1925                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1927                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1928                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1929                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1930                 </fields>
1931                 <links>
1932                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1933                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1934                 </links>
1935         </class>
1936         <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">
1937                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1938                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1939                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1940                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1941                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1942                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1943                 </fields>
1944                 <links>
1945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1946                 </links>
1947         </class>
1948         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1949                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1950                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1951                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1952                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1953                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1954                 </fields>
1955                 <links>
1956                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1957                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1958                 </links>
1959         </class>
1960         <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">
1961                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1962                         <field name="field" reporter:datatype="link"/>
1963                         <field name="id" reporter:datatype="id" />
1964                         <field name="source" reporter:datatype="link"/>
1965                         <field name="value" reporter:datatype="text"/>
1966                 </fields>
1967                 <links>
1968                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1969                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1970                 </links>
1971         </class>
1972         <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">
1973                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1974                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1975                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1976                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1977                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1978                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1979                 </fields>
1980                 <links>
1981                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1982                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1983                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1984                 </links>
1985         </class>
1986         <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">
1987                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1988                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1989                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1990                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1991                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1992                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1993                 </fields>
1994                 <links>
1995                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1996                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1997                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1998                 </links>
1999         </class>
2000         <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">
2001                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2002                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2003                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2004                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2005                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2006                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2007                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2008                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2009                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2010                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2011                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2012                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2013                 </fields>
2014                 <links>
2015                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2016                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2017                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2018                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2019                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2020                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2021                 </links>
2022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2023             <actions>
2024                 <create permission="TRANSIT_COPY" context_field="owner">
2025                     <context link="target_copy" field="circ_lib"/>
2026                 </create>
2027                 <retrieve/>
2028                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2029                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2030             </actions>
2031         </permacrud>
2032         </class>
2033         <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">
2034                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2035                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2036                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2038                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2039                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2040                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2041                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2042                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2043                 </fields>
2044                 <links>
2045                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2046                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2047                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2048                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2049                 </links>
2050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2051             <actions>
2052                 <create permission="ADMIN_SURVEY">
2053                     <context link="survey" field="owner"/>
2054                 </create>
2055                 <retrieve/>
2056                 <update permission="ADMIN_SURVEY">
2057                     <context link="survey" field="owner"/>
2058                 </update>
2059                 <delete permission="ADMIN_SURVEY">
2060                     <context link="survey" field="owner"/>
2061                 </delete>
2062             </actions>
2063         </permacrud>
2064         </class>
2065         <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">
2066                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2067                         <field name="bucket" />
2068                         <field name="id" reporter:datatype="id" />
2069                         <field name="target_copy" reporter:datatype="link"/>
2070                         <field name="create_time" reporter:datatype="timestamp" />
2071                         <field name="pos" reporter:datatype="int" />
2072                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2073                 </fields>
2074                 <links>
2075                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2076                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2077             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2078                 </links>
2079         </class>
2080         <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">
2081                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2082                         <field name="id" reporter:datatype="id" />
2083                         <field name="item" reporter:datatype="link"/>
2084                         <field name="note" reporter:datatype="text" />
2085                 </fields>
2086                 <links>
2087                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2088                 </links>
2089         </class>
2090
2091         <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">
2092                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2093                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2094                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2095                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2096                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2097                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2098                 </fields>
2099                 <links>
2100                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2101                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2102                 </links>
2103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2104                         <actions>
2105                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2106                                 <retrieve/>
2107                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2108                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                         </actions>
2110                 </permacrud>
2111         </class>
2112
2113         <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">
2114                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2115                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2116                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2117                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2118                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2119                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2120                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2121                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2123                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2124                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2125                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2126                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2127                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2128                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2129                 </fields>
2130                 <links>
2131                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2132                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2133                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2134                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2135                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2136                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2137                 </links>
2138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2139                         <actions>
2140                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                                 <retrieve/>
2142                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2143                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2144                         </actions>
2145                 </permacrud>
2146         </class>
2147
2148         <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">
2149                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2150                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2151                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2152                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2153                 </fields>
2154                 <links>
2155                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2156                 </links>
2157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158                         <actions>
2159                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2160                                 <retrieve/>
2161                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2163                         </actions>
2164                 </permacrud>
2165         </class>
2166
2167         <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">
2168                 <fields oils_persist:primary="code">
2169                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2170                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2171                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2172                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2173                 </fields>
2174                 <links>
2175                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2176                 </links>
2177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2178                         <actions>
2179                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2180                                 <retrieve/>
2181                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2182                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2183                         </actions>
2184                 </permacrud>
2185         </class>
2186
2187         <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">
2188                 <fields oils_persist:primary="code">
2189                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2190                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2191                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2192                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2193                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2194                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2195                 </fields>
2196                 <links>
2197                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2198                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2199                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2200                 </links>
2201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2202                         <actions>
2203                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2204                                 <retrieve/>
2205                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2206                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2207                         </actions>
2208                 </permacrud>
2209         </class>
2210
2211     <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">
2212         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2213             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2214             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2215             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2216         </fields>
2217         <links>
2218             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2219             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2220         </links>
2221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2222             <actions>
2223                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2224                 <retrieve/>
2225                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2227             </actions>
2228         </permacrud>
2229     </class>
2230
2231         <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">
2232                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2233                         <field name="active" reporter:datatype="bool"/>
2234                         <field name="create_date" reporter:datatype="timestamp"/>
2235                         <field name="creator" />
2236                         <field name="deleted" reporter:datatype="bool"/>
2237                         <field name="edit_date" reporter:datatype="timestamp"/>
2238                         <field name="editor" />
2239                         <field name="id" reporter:datatype="id" />
2240                         <field name="last_xact_id" />
2241                         <field name="marc" />
2242                         <field name="source" />
2243                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2244                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2245                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2247                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2248                 </fields>
2249                 <links>
2250                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2251                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2252                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2253                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2254                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2255                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2256                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2257                 </links>
2258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2259                         <actions>
2260                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2261                                 <retrieve/>
2262                                 <update permission="UPDATE_MARC" global_required="true"/>
2263                                 <delete permission="UPDATE_MARC" global_required="true"/>
2264                         </actions>
2265                 </permacrud>
2266         </class>
2267         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2268                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2269                         <field name="char_encoding" />
2270                         <field name="id" />
2271                         <field name="record" />
2272                         <field name="record_status" />
2273                         <field name="thesaurus" />
2274                 </fields>
2275                 <links>
2276                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2277                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2278                 </links>
2279         </class>
2280         <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">
2281                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2282                         <field name="id" reporter:datatype="id" />
2283                         <field name="bib" reporter:datatype="link" />
2284                         <field name="authority" reporter:datatype="link" />
2285                 </fields>
2286                 <links>
2287                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2288                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2289                 </links>
2290         </class>
2291         <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">
2292                 <fields oils_persist:primary="code" oils_persist:sequence="">
2293                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2294                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2295                 </fields>
2296                 <links/>
2297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2298             <actions>
2299                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2300                 <retrieve/>
2301                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2302                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2303             </actions>
2304         </permacrud>
2305         </class>
2306         <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">
2307                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2308                         <field name="accepting_usr" />
2309                         <field name="amount" reporter:datatype="money" />
2310                         <field name="amount_collected" reporter:datatype="money" />
2311                         <field name="approval_code" reporter:datatype="text"/>
2312                         <field name="cash_drawer" reporter:datatype="link"/>
2313                         <field name="cc_first_name" reporter:datatype="text"/>
2314                         <field name="cc_last_name" reporter:datatype="text"/>
2315                         <field name="cc_number" reporter:datatype="text"/>
2316                         <field name="cc_order_number" reporter:datatype="text"/>
2317                         <field name="cc_type" reporter:datatype="text"/>
2318                         <field name="cc_processor" reporter:datatype="text"/>
2319                         <field name="expire_month" reporter:datatype="int" />
2320                         <field name="expire_year" reporter:datatype="int" />
2321                         <field name="id" reporter:datatype="id" />
2322                         <field name="note" reporter:datatype="text"/>
2323                         <field name="payment_ts" reporter:datatype="timestamp"/>
2324                         <field name="xact" reporter:datatype="link"/>
2325                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2326                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2327                 </fields>
2328                 <links>
2329                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2330                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2331                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2332                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2333                 </links>
2334         </class>
2335         <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">
2336                 <fields oils_persist:primary="name">
2337                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2338                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2339                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2340                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2341                 </fields>
2342                 <links/>
2343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2344             <actions>
2345                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2346                 <retrieve/>
2347                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2348                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2349             </actions>
2350         </permacrud>
2351         </class>
2352
2353         <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">
2354                 <fields oils_persist:primary="alias">
2355                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2356                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2357                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2358                 </fields>
2359                 <links>
2360                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2361                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2362                 </links>
2363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2364             <actions>
2365                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2366                 <retrieve/>
2367                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2368                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2369             </actions>
2370         </permacrud>
2371         </class>
2372
2373         <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">
2374                 <fields oils_persist:primary="name">
2375                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2376                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2377                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2378                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2379                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2380                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2381                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2382                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2383                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2384                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2385                 </fields>
2386                 <links>
2387                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2388                 </links>
2389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2390             <actions>
2391                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2392                 <retrieve/>
2393                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2394                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2395             </actions>
2396         </permacrud>
2397         </class>
2398
2399         <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">
2400                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2401                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2402                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2403                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2404                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2405                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2406                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2407                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2408                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2409                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2410                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2411                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2412                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2413                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2414                 </fields>
2415                 <links>
2416                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2417                 </links>
2418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2419             <actions>
2420                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2421                 <retrieve/>
2422                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2423                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2424             </actions>
2425         </permacrud>
2426         </class>
2427         <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">
2428                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2429                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2430                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2431                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2432                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2433                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2434                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2435                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2436                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2437                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2438                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2439                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2440                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2441                 </fields>
2442                 <links>
2443                 </links>
2444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2445                         <actions>
2446                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2448                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2449                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2450                         </actions>
2451                 </permacrud>
2452         </class>
2453         <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">
2454                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2455                         <field name="id" reporter:datatype="id" />
2456                         <field name="name" reporter:datatype="text"/>
2457                         <field name="xpath" reporter:datatype="text"/>
2458                         <field name="format" reporter:datatype="link"/>
2459                         <field name="first_word" reporter:datatype="bool" />
2460                 </fields>
2461                 <links/>
2462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2463             <actions>
2464                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2465                 <retrieve/>
2466                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2467                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2468             </actions>
2469         </permacrud>
2470         </class>
2471         <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">
2472                 <fields oils_persist:primary="code" oils_persist:sequence="">
2473                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2474                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2475                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2476                 </fields>
2477                 <links/>
2478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2479             <actions>
2480                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2481                 <retrieve/>
2482                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2483                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2484             </actions>
2485         </permacrud>
2486         </class>
2487         <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">
2488                 <fields oils_persist:primary="code" oils_persist:sequence="">
2489                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2490                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2491                 </fields>
2492                 <links/>
2493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2494             <actions>
2495                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2496                 <retrieve/>
2497                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2498                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2499             </actions>
2500         </permacrud>
2501         </class>
2502     <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">
2503         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2504             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2505             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2506             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2507             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2508         </fields>
2509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2510             <actions>
2511                 <retrieve/>
2512             </actions>
2513         </permacrud>
2514     </class>
2515         <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">
2516                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2517                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2518                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2519                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2520                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2521                 </fields>
2522                 <links>
2523                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2524                 </links>
2525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526             <actions>
2527                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2528                 <retrieve/>
2529                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2530                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2531             </actions>
2532         </permacrud>
2533         </class>
2534         <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">
2535                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2536                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2537                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2538                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2539                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2540                 </fields>
2541                 <links>
2542                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2543                 </links>
2544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2545             <actions>
2546                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2547                 <retrieve/>
2548                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2549                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2550             </actions>
2551         </permacrud>
2552         </class>
2553         <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">
2554                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2555                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2557                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2558                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2559                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2560                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2561                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2562                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2563                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2564                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2565                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2566                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2567                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2568                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2569                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2570                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2571                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2572                 </fields>
2573                 <links>
2574                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2575                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2576                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2577                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2578                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2579                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2580                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2581                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2582                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2583                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2584                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2585                 </links>
2586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2587             <actions>
2588                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2589                 <retrieve/>
2590                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2591                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2592             </actions>
2593         </permacrud>
2594         </class>
2595         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2597                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2598                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2599                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2600                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2601                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2602                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2604                 </fields>
2605                 <links>
2606                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2607                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2608         </links>
2609         </class>
2610         <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">
2611                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2612                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2613                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2614                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2615                 </fields>
2616                 <links>
2617                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2618                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2619                 </links>
2620         </class>
2621         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2622                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2623                         <field name="id" reporter:datatype="id" />
2624                         <field name="value" oils_persist:i18n="true" />
2625                 </fields>
2626                 <links/>
2627         </class>
2628         <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">
2629                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2630                         <field name="balance_owed" reporter:datatype="money" />
2631                         <field name="total_owed" reporter:datatype="money" />
2632                         <field name="total_paid" reporter:datatype="money" />
2633                         <field name="usr" reporter:datatype="link"/>
2634                 </fields>
2635                 <links>
2636                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2637         </links>
2638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2639             <actions>
2640                 <retrieve permission="VIEW_USER">
2641                     <context link="usr" field="home_ou"/>
2642                 </retrieve>
2643             </actions>
2644         </permacrud>
2645         </class>
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2648                         <field name="collector" />
2649                         <field name="enter_time" reporter:datatype="timestamp"/>
2650                         <field name="id" reporter:datatype="id" />
2651                         <field name="location" reporter:datatype="link"/>
2652                         <field name="usr" reporter:datatype="link"/>
2653                 </fields>
2654                 <links>
2655                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2657                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2658                 </links>
2659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2660             <actions>
2661                 <create permission="money.collections_tracker.create" context_field="location"/>
2662                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2663                 <delete permission="money.collections_tracker.create" context_field="location"/>
2664             </actions>
2665         </permacrud>
2666         </class>
2667         <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">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2669                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2671                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2672                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2674                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2675                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2676                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2677                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2678                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2679                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2680                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2681                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2682                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2683                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2684                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2685                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2686                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2687                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2701                 </fields>
2702                 <links>
2703                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2704                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2705                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2706                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2707                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2708                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2709                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2710                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2711                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2712                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2713                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2714                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2715                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2716                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2717                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2718                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2719                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2720                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2721                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2722                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2723                 </links>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2727                 <retrieve/>
2728                 <update permission="UPDATE_MARC" global_required="true"/>
2729             </actions>
2730         </permacrud>
2731         </class>
2732         <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">
2733                 <fields oils_persist:primary="id">
2734                         <field name="dow_0_close" />
2735                         <field name="dow_0_open" />
2736                         <field name="dow_1_close" />
2737                         <field name="dow_1_open" />
2738                         <field name="dow_2_close" />
2739                         <field name="dow_2_open" />
2740                         <field name="dow_3_close" />
2741                         <field name="dow_3_open" />
2742                         <field name="dow_4_close" />
2743                         <field name="dow_4_open" />
2744                         <field name="dow_5_close" />
2745                         <field name="dow_5_open" />
2746                         <field name="dow_6_close" />
2747                         <field name="dow_6_open" />
2748                         <field name="id" reporter:datatype="id" />
2749                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2750                 </fields>
2751                 <links>
2752                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2753                 </links>
2754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2755             <actions>
2756                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2757                 <retrieve/>
2758                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2759                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2760             </actions>
2761         </permacrud>
2762         </class>
2763         <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">
2764                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2765                         <field name="id" reporter:datatype="id" />
2766                         <field name="record" reporter:datatype="link"/>
2767                         <field name="label" reporter:datatype="text"/>
2768                         <field name="label_sortkey" reporter:datatype="text"/>
2769                 </fields>
2770                 <links>
2771                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2772                 </links>
2773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2774             <actions>
2775                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2776                 <retrieve/>
2777                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2778                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2779             </actions>
2780         </permacrud>
2781         </class>
2782         <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">
2783                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2784                         <field name="id" reporter:datatype="id" />
2785                         <field name="target_copy" reporter:datatype="link" />
2786                         <field name="part" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2790                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2791                 </links>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2795                 <retrieve/>
2796                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2797                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2798             </actions>
2799         </permacrud>
2800         </class>
2801         <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">
2802                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2803                         <field name="close_end" reporter:datatype="timestamp" />
2804                         <field name="close_start" reporter:datatype="timestamp" />
2805                         <field name="id" reporter:datatype="id" />
2806                         <field name="org_unit" reporter:datatype="org_unit"/>
2807                         <field name="reason" reporter:datatype="text"/>
2808                 </fields>
2809                 <links>
2810                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2811                 </links>
2812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2813             <actions>
2814                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2815                 <retrieve/>
2816                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2817                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2818             </actions>
2819         </permacrud>
2820         </class>
2821         <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">
2822                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2823                         <field name="extended" reporter:datatype="interval"/>
2824                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2825                         <field name="max_renewals" reporter:datatype="int" />
2826                         <field name="name" reporter:datatype="text"/>
2827                         <field name="normal" reporter:datatype="interval"/>
2828                         <field name="shrt" reporter:datatype="interval"/>
2829                 </fields>
2830                 <links>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2837                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841
2842         <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">
2843                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2844                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2845                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2846             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2847                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2848             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2849                 </fields>
2850                 <links>
2851             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2852                 </links>
2853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2854             <actions>
2855                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2856                 <retrieve/>
2857                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2858                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2859             </actions>
2860                 </permacrud>
2861         </class>
2862
2863         <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">
2864                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2866                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2867                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2868             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2869                 </fields>
2870                 <links>
2871                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2872                 </links>
2873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2876                 <retrieve/>
2877                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2878                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2879             </actions>
2880                 </permacrud>
2881         </class>
2882
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="">
2885                         <field name="balance_owed" reporter:datatype="money"/>
2886                         <field name="id" reporter:datatype="id" />
2887                         <field name="last_billing_note" reporter:datatype="text"/>
2888                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2889                         <field name="last_billing_type" reporter:datatype="text"/>
2890                         <field name="last_payment_note" reporter:datatype="text"/>
2891                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2892                         <field name="last_payment_type" reporter:datatype="text"/>
2893                         <field name="total_owed" reporter:datatype="money"/>
2894                         <field name="total_paid" reporter:datatype="money"/>
2895                         <field name="usr" reporter:datatype="link"/>
2896                         <field name="xact_finish" reporter:datatype="timestamp" />
2897                         <field name="xact_start" reporter:datatype="timestamp" />
2898                         <field name="xact_type" reporter:datatype="text"/>
2899                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2903                         <field name="billing_location" reporter:datatype="link"/>
2904                 </fields>
2905                 <links>
2906                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2907                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2908                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2909                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2910                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2911                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2912                 </links>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2916                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2925                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2926                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2927                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2928                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2929                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2930                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2931                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2932                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2933                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2934                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2935                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2936                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2937                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2938                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2939                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2940                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2941                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2942                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2943                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2944                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2945                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2946                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2947                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2948                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2949                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2950                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2951                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2952                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2953                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2954                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2955                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2956                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2957                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2958                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2959                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2960                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2961                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2962                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2963                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2964                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2965                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2966                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2967                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2968                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2969                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2979                 </fields>
2980                 <links>
2981                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2982                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2983                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2984                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2985                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2986                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2987                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2988                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2989                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2990                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2991                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2992                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2993                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2994                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2995                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
2996                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2997                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2998                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2999                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3000                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3001                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3002                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3003                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3004                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3005                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3006                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3007                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3008                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3009                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3010                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3011                 </links>
3012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3013                         <actions>
3014                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3015                         </actions>
3016                 </permacrud>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3020                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3021                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3022                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3023                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3024                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3025                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3026                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3027                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3028         </fields>
3029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3030                         <actions>
3031                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3032                                 <retrieve/>
3033                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3034                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3035                         </actions>
3036                 </permacrud>
3037         </class>
3038         <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">
3039                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3040                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3041                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3042                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3043                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3044         </fields>
3045         <links>
3046                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3047                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3048                 </links>
3049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3050                         <actions>
3051                                 <retrieve permission="RUN_REPORTS">
3052                                         <context link="usr" field="home_ou" />
3053                                 </retrieve>
3054                         </actions>
3055                 </permacrud>
3056         </class>
3057         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3059                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3060                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3061                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3062                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3063                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3064                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3065         </fields>
3066         <links>
3067                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3068                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3069                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3070                 </links>
3071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3072                         <actions>
3073                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3074                                         <context link="usr" field="home_ou" />
3075                                         <context link="ws" field="owning_lib" />
3076                                 </retrieve>
3077                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3078                                         <context link="usr" field="home_ou" />
3079                                         <context link="ws" field="owning_lib" />
3080                                 </create>
3081                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3082                                         <context link="usr" field="home_ou" />
3083                                         <context link="ws" field="owning_lib" />
3084                                 </update>
3085                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3086                                         <context link="usr" field="home_ou" />
3087                                         <context link="ws" field="owning_lib" />
3088                                 </delete>
3089                         </actions>
3090                 </permacrud>
3091         </class>
3092         <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">
3093                 <fields oils_persist:primary="name">
3094                         <field name="name" reporter:datatype="text"/>
3095                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3096                 </fields>
3097                 <links/>
3098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099                         <actions>
3100                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3101                                 <retrieve/>
3102                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3103                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3104                         </actions>
3105                 </permacrud>
3106         </class>
3107         <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">
3108                 <fields oils_persist:primary="name">
3109                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3110                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3111                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3112                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3113                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3114                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3115                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3116                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3117                 </fields>
3118                 <links>
3119                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3120                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3121                 </links>
3122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3123                         <actions>
3124                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3125                                 <retrieve/>
3126                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3127                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3128                         </actions>
3129                 </permacrud>
3130         </class>
3131         <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">
3132                 <fields oils_persist:primary="name">
3133                         <field name="name" reporter:datatype="text"/>
3134                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3135                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3136                         <field name="datatype" reporter:datatype="text"/>
3137                         <field name="view_perm" reporter:datatype="link"/>
3138                         <field name="update_perm" reporter:datatype="link"/>
3139                         <field name="fm_class" reporter:datatype="text"/>
3140                         <field name="grp" reporter:datatype="link"/>
3141                 </fields>
3142                 <links>
3143                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3144                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3145                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3146                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3147                 </links>
3148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3149                         <actions>
3150                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3151                                 <retrieve/>
3152                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3153                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3154                         </actions>
3155                 </permacrud>
3156         </class>
3157         <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">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3159                         <field name="id" />
3160                         <field name="name"  reporter:datatype="text"/>
3161                         <field name="org_unit" reporter:datatype="org_unit"/>
3162                         <field name="value"  reporter:datatype="text"/>
3163                 </fields>
3164                 <links>
3165                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3166                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3167                 </links>
3168         </class>
3169         <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">
3170                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3171                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3172                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3173                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3174                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3175                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3176                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3177                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3178                 </fields>
3179                 <links>
3180                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3181                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3182                 </links>
3183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3184             <actions>
3185                 <create permission="CREATE_COPY_NOTE">
3186                     <context link="owning_copy" field="circ_lib"/>
3187                 </create>
3188                 <retrieve permission="VIEW_COPY_NOTES">
3189                     <context link="owning_copy" field="circ_lib"/>
3190                 </retrieve>
3191                 <update permission="UPDATE_COPY_NOTE">
3192                     <context link="owning_copy" field="circ_lib"/>
3193                 </update>
3194                 <delete permission="DELETE_COPY_NOTE">
3195                     <context link="owning_copy" field="circ_lib"/>
3196                 </delete>
3197             </actions>
3198         </permacrud>
3199         </class>
3200         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3201                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3202                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3203                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3204                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3205                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3206                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3207                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3208                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3209                 </fields>
3210                 <links>
3211                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3212                 </links>
3213         </class>
3214         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3216                         <field name="fingerprint"  reporter:datatype="text"/>
3217                         <field name="id" reporter:datatype="id" />
3218                         <field name="master_record" reporter:datatype="link"/>
3219                         <field name="mods"  reporter:datatype="text"/>
3220                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3221                 </fields>
3222                 <links>
3223                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3224                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3225                 </links>
3226         </class>
3227         <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">
3228                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3229                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3230                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3231                 </fields>
3232                 <links/>
3233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3234             <actions>
3235                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3236                 <retrieve/>
3237                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3238                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3239             </actions>
3240         </permacrud>
3241         </class>
3242         <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">
3243                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3244                         <field name="code"  reporter:datatype="text"/>
3245                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3246                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3247                 </fields>
3248                 <links/>
3249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_PERM" global_required="true"/>
3252                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3253                 <update permission="UPDATE_PERM" global_required="true"/>
3254                 <delete permission="DELETE_PERM" global_required="true"/>
3255             </actions>
3256         </permacrud>
3257         </class>
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3260                         <field name="id" reporter:datatype="id" />
3261                         <field name="metarecord" reporter:datatype="link"/>
3262                         <field name="source" reporter:datatype="link"/>
3263                 </fields>
3264                 <links>
3265                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3266                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3267                 </links>
3268         </class>
3269         <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">
3270                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3271                         <field name="id" reporter:datatype="id" />
3272                         <field name="field" reporter:datatype="link"/>
3273                         <field name="source" reporter:datatype="link"/>
3274                         <field name="value"  reporter:datatype="text"/>
3275                 </fields>
3276                 <links>
3277                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3278                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3279                 </links>
3280         </class>
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3283                         <field name="id" reporter:datatype="id" />
3284                         <field name="value" reporter:datatype="text"/>
3285                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3286                 </fields>
3287                 <links>
3288                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3289                 </links>
3290         </class>
3291         <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">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3293                         <field name="id" reporter:datatype="id" />
3294                         <field name="entry" reporter:datatype="link"/>
3295                         <field name="def" reporter:datatype="link"/>
3296                         <field name="source" reporter:datatype="link"/>
3297                 </fields>
3298                 <links>
3299                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3300                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3301                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3302                 </links>
3303         </class>
3304         <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">
3305                 <oils_persist:source_definition>
3306                         SELECT * FROM metabib.author_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.keyword_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.identifier_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.title_field_entry
3313                                                 UNION ALL
3314                         SELECT * FROM metabib.subject_field_entry
3315                                                 UNION ALL
3316                         SELECT * FROM metabib.series_field_entry
3317                 </oils_persist:source_definition>
3318                 <fields>
3319                         <field name="field" reporter:datatype="link"/>
3320                         <field name="id" reporter:datatype="id" />
3321                         <field name="source" reporter:datatype="link"/>
3322                         <field name="value"  reporter:datatype="text"/>
3323                 </fields>
3324                 <links>
3325                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3326                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3327                 </links>
3328         </class>
3329         <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">
3330                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3331                         <field name="field" reporter:datatype="link"/>
3332                         <field name="id" reporter:datatype="id" />
3333                         <field name="source" reporter:datatype="link"/>
3334                         <field name="value"  reporter:datatype="text"/>
3335                 </fields>
3336                 <links>
3337                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3338                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3339                 </links>
3340         </class>
3341         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3342                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3343                         <field name="accepting_usr" reporter:datatype="link"/>
3344                         <field name="amount" reporter:datatype="money" />
3345                         <field name="amount_collected" reporter:datatype="money" />
3346                         <field name="cash_drawer" reporter:datatype="link"/>
3347                         <field name="id" reporter:datatype="id" />
3348                         <field name="note"  reporter:datatype="text"/>
3349                         <field name="payment_ts" reporter:datatype="timestamp"/>
3350                         <field name="xact" reporter:datatype="link"/>
3351                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3352                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3353                 </fields>
3354                 <links>
3355                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3356                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3357                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3358                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3359                 </links>
3360         </class>
3361         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3362                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3363                         <field name="accepting_usr" reporter:datatype="link"/>
3364                         <field name="amount" reporter:datatype="money" />
3365                         <field name="amount_collected" reporter:datatype="money" />
3366                         <field name="id" reporter:datatype="id" />
3367                         <field name="note"  reporter:datatype="text"/>
3368                         <field name="payment_ts" reporter:datatype="timestamp"/>
3369                         <field name="xact" reporter:datatype="link"/>
3370                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3371                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3372                 </fields>
3373                 <links>
3374                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3375                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3376                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3377                 </links>
3378         </class>
3379         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3380                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3381                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3384                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3386                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3388                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3390                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3392                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3394                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3395                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3396                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3397                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3398                 </fields>
3399                 <links>
3400                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3401                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3402                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3403                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3404                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3405                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3406                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3407                 </links>
3408         </class>
3409
3410         <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">
3411                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3412                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3413                         <field name="name"  reporter:datatype="text"/>
3414                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3415                         <field name="block_list" reporter:datatype="text"/>
3416                         <field name="staff_alert" reporter:datatype="bool"/>
3417                         <field name="org_depth" reporter:datatype="int"/>
3418                 </fields>
3419                 <links/>
3420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3421             <actions>
3422                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3423                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3424                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3425                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3426             </actions>
3427         </permacrud>
3428         </class>
3429         <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">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3431                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3432                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3433                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3434                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3435                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3436                 </fields>
3437                 <links>
3438                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3439                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3440                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3441         </links>
3442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3443             <actions>
3444                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3445                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3446                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3447                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3448             </actions>
3449         </permacrud>
3450         </class>
3451         <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">
3452                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3453                         <field name="holdable" reporter:datatype="bool"/>
3454                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3455                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3456                         <field name="opac_visible" reporter:datatype="bool"/>
3457             <field name="copy_active" reporter:datatype="bool"/>
3458             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3459                 </fields>
3460                 <links/>
3461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3462             <actions>
3463                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3464                 <retrieve/>
3465                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3466                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3467             </actions>
3468         </permacrud>
3469         </class>
3470         <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">
3471                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3472                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3473                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3474                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3475                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3476                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3477                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3478                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3479                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3480                 </fields>
3481                 <links>
3482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3483                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3484                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3485                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3486                 </links>
3487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3488                         <actions>
3489                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3490                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3491                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3492                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3493                         </actions>
3494                 </permacrud>
3495         </class>
3496         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3497                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3498                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3499                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3500                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3501                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3502                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3503                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3504                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3505                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3506                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3507                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3508                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3509                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3510                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3511                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3512                 </fields>
3513                 <links>
3514                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3515                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3516                 </links>
3517         </class>
3518         <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">
3519                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3520                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3521                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3522                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3523                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3524                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3525                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3526                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3527                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3528                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3529                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3530                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3531                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3532                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3533                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3534                 </fields>
3535                 <links>
3536                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3537                 </links>
3538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3539                         <actions>
3540                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3541                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3542                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3543                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3544                         </actions>
3545                 </permacrud>
3546         </class>
3547
3548
3549         <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">
3550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3551                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3552                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3553                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3554                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3555                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3556                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3557                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3558                 </fields>
3559                 <links>
3560                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3561                 </links>
3562         </class>
3563
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3566                         <field name="call_number" />
3567                         <field name="create_date" reporter:datatype="timestamp"/>
3568                         <field name="creator" reporter:datatype="link"/>
3569                         <field name="id" reporter:datatype="id" />
3570                         <field name="pub" reporter:datatype="bool"/>
3571                         <field name="title"  reporter:datatype="text"/>
3572                         <field name="value"  reporter:datatype="text"/>
3573                 </fields>
3574                 <links>
3575                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3576                 </links>
3577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3578             <actions>
3579                 <create permission="CREATE_VOLUME_NOTE">
3580                     <context link="call_number" field="owning_lib"/>
3581                 </create>
3582                 <retrieve permission="VIEW_VOLUME_NOTES">
3583                     <context link="call_number" field="owning_lib"/>
3584                 </retrieve>
3585                 <update permission="UPDATE_VOLUME_NOTE">
3586                     <context link="call_number" field="owning_lib"/>
3587                 </update>
3588                 <delete permission="DELETE_VOLUME_NOTE">
3589                     <context link="call_number" field="owning_lib"/>
3590                 </delete>
3591             </actions>
3592         </permacrud>
3593         </class>
3594         <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">
3595                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3596                         <field name="create_date" reporter:datatype="timestamp"/>
3597                         <field name="creator" reporter:datatype="link"/>
3598                         <field name="edit_date" reporter:datatype="timestamp"/>
3599                         <field name="editor" reporter:datatype="link"/>
3600                         <field name="id" reporter:datatype="id" />
3601                         <field name="record" reporter:datatype="link"/>
3602                         <field name="value" reporter:datatype="text"/>
3603                 </fields>
3604                 <links>
3605                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3606                 </links>
3607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3608             <actions>
3609                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3610                 <retrieve/>
3611                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3612                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3613             </actions>
3614         </permacrud>
3615         </class>
3616         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3617         <oils_persist:source_definition>
3618 SELECT  usr,
3619         SUM(
3620             CASE
3621                 WHEN (
3622                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3623                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3624                 ) THEN 1
3625                 ELSE 0
3626             END
3627         ) AS out,
3628
3629         SUM(
3630             CASE
3631                 WHEN (
3632                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3633                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3634                 ) THEN 1
3635                 ELSE 0
3636             END
3637         ) AS overdue,
3638
3639         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3640         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3641         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3642   FROM  action.circulation
3643   WHERE checkin_time IS NULL
3644   GROUP BY 1
3645         </oils_persist:source_definition>
3646         <fields oils_persist:primary="usr">
3647             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3648             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3649             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3650             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3651             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3652             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3653         </fields>
3654         <links>
3655             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3656         </links>
3657         </class>
3658         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3659         <oils_persist:source_definition>
3660 SELECT  usr,
3661         ARRAY_TO_STRING(ARRAY_ACCUM(
3662             CASE
3663                 WHEN (
3664                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3665                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3666                 ) THEN id
3667                 ELSE 0
3668             END
3669         ),',') AS out,
3670
3671         ARRAY_TO_STRING(ARRAY_ACCUM(
3672             CASE
3673                 WHEN (
3674                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3675                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3676                 ) THEN id
3677                 ELSE 0
3678             END
3679         ),',') AS overdue,
3680
3681         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3682         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3683         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3684   FROM  action.circulation
3685   WHERE checkin_time IS NULL
3686   GROUP BY 1
3687         </oils_persist:source_definition>
3688         <fields oils_persist:primary="usr">
3689             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3690             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3691             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3692             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3693             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3694             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3695         </fields>
3696         <links>
3697             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3698         </links>
3699         </class>
3700         <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">
3701                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3702                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3703                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3704                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3705                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3706                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3707                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3708                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3709                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3710                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3711                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3712                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3713                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3714                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3715                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3716                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3717                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3718                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3719                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3720                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3721                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3722                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3723                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3724                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3725                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3726                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3727                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3728                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3729                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3730                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3731                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3732                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3734                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3735                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3736                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3737                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3738                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3739                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3740                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3741                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3742                 </fields>
3743                 <links>
3744                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3745                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3746                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3747                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3748                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3749                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3750                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3751                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3752                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3753                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3754                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3755                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3756                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3757                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3758                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3759                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3760                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3761                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3762                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3763                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3764                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3765                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3766                 </links>
3767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3768                         <actions>
3769                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3770                         </actions>
3771                 </permacrud>
3772         </class>
3773         <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">
3774                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3775                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3776                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3777                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3778                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3779                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3780                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3781                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3782                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3783                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3784                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3785                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3786                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3787                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3788                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3789                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3790                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3791                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3792                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3793                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3794                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3795                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3796                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3797                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3798                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3799                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3800                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3801                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3803                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3804                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3805                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3806                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3807                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3808                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3809                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3810                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3811                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3812                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3813                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3814                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3815                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3816                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3817                 </fields>
3818                 <links>
3819                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3820                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3821                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3822                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3823                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3824                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3825                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3826                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3827                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3828                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3829                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3830                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3831                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3832                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3833                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3834                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3835                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3836                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3837                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3838                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3839                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3840                 </links>
3841         </class>
3842         <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">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3844                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3845                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3846                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3848                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3849                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3850                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3851                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3852                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3853                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3854                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3855                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3856                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3857                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3858                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3859                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3860                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3861                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3862                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3863                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3864                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3865                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3866                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3867                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3868                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3869                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3870                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3871                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3872                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3873                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3874                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3876                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3877                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3878                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3879                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3880                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3881                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3882                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3883                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3884                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3885                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3886                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3887                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3888                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3889                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3890                 </fields>
3891                 <links>
3892                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3893                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3894                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3895                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3896                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3897                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3898                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3899                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3900                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3901                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3902                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3903                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3904                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3905                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3906                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3907                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3908                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3909                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3910                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3911                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3912                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3913                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3914                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3915                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3916                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3917                 </links>
3918         </class>
3919
3920         <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">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3922                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3923                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3924                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3925                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3926                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3927                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3928                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3929                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3930                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3931                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3932                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3938                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3939                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3940                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3941                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3942                 </links>
3943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3944                         <actions>
3945                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3946                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3947                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3948                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3949                         </actions>
3950                 </permacrud>
3951         </class>
3952
3953         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3954                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3955                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3956                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3957                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3958                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3959                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3960                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3961                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3962                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3963                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3965                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3966                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3967                 </fields>
3968                 <links>
3969                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3970                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3971                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3972                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3973                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3974                 </links>
3975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3976                         <actions>
3977                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3978                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3979                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3980                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3981                         </actions>
3982                 </permacrud>
3983         </class>
3984         
3985         <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">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3987                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3988                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3989                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3990                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3991                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3992                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3993                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3994                 </fields>
3995                 <links>
3996                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3997                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3998                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3999                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4000                 </links>
4001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4002                         <actions>
4003                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4004                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4005                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4006                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4007                         </actions>
4008                 </permacrud>
4009         </class>
4010         
4011         <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">
4012                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4013                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4014                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4015                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4016                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4017                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4018                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4019                 </fields>
4020                 <links>
4021                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4022                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4023                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4024                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4025                 </links>
4026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4027                         <actions>
4028                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4029                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4030                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4031                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4032                         </actions>
4033                 </permacrud>
4034         </class>
4035         
4036         <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">
4037                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4038                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4039                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4040                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4041                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4042                 </fields>
4043                 <links>
4044                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4045                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4046                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4047                 </links>
4048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4049                         <actions>
4050                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4051                     <context link="resource" field="owner" />
4052                 </create>
4053                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4054                     <context link="resource" field="owner" />
4055                 </retrieve>
4056                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4057                     <context link="resource" field="owner" />
4058                 </update>
4059                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4060                     <context link="resource" field="owner" />
4061                 </delete>
4062                         </actions>
4063                 </permacrud>
4064         </class>
4065         
4066         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4067                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4068                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4069                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4070                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4071                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4072                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4073                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4075                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4076                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4077                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4082                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4084                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4085                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4086                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4087                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4088                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4089                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4090                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4091                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4092                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4093                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4094                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4095                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4096                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4097                 </fields>
4098                 <links>
4099                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4100                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4101                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4102                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4103                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4104                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4105                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4106                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4107                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4108                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4109                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4110                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4111                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4112                 </links>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4116                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4117                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4118                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4119                         </actions>
4120                 </permacrud>
4121         </class>
4122         
4123         <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">
4124                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4125                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4126                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4127                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4128                 </fields>
4129                 <links>
4130                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4131                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4132                 </links>
4133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4134                         <actions>
4135                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4136                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4137                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4138                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4139                         </actions>
4140                 </permacrud>
4141         </class>
4142
4143         <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">
4144                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4145                         <field name="bucket" reporter:datatype="link"/>
4146                         <field name="id" reporter:datatype="id" />
4147                         <field name="target_call_number" reporter:datatype="link" />
4148                         <field name="create_time" reporter:datatype="timestamp" />
4149                         <field name="pos" reporter:datatype="int" />
4150                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4151                 </fields>
4152                 <links>
4153                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4154                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4155             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4156                 </links>
4157         </class>
4158         <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">
4159                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4160                         <field name="id" reporter:datatype="id" />
4161                         <field name="item" reporter:datatype="link"/>
4162                         <field name="note" reporter:datatype="text" />
4163                 </fields>
4164                 <links>
4165                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4166                 </links>
4167         </class>
4168         <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">
4169                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4170                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4171                         <field name="btype" reporter:datatype="text"/>
4172                         <field name="id" reporter:datatype="id" />
4173                         <field name="name" reporter:datatype="text"/>
4174                         <field name="description" reporter:datatype="text"/>
4175                         <field name="owner" reporter:datatype="link"/>
4176                         <field name="pub" reporter:datatype="bool"/>
4177                         <field name="create_time" reporter:datatype="timestamp" />
4178                 </fields>
4179                 <links>
4180                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4181                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4182                 </links>
4183         </class>
4184         <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">
4185                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4186                         <field name="id" reporter:datatype="id" />
4187                         <field name="bucket" reporter:datatype="link"/>
4188                         <field name="note" reporter:datatype="text" />
4189                 </fields>
4190                 <links>
4191                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4192                 </links>
4193         </class>
4194         <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">
4195                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4196                         <field name="hold" reporter:datatype="link"/>
4197                         <field name="id" reporter:datatype="id" />
4198                         <field name="target_copy" reporter:datatype="link"/>
4199                         <field name="proximity" reporter:datatype="number"/>
4200                 </fields>
4201                 <links>
4202                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4203                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4204                 </links>
4205         </class>
4206         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4207                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4208                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4209                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4210                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4211                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4212                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4213                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4214                 </fields>
4215                 <links>
4216                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4217                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4218                 </links>
4219         </class>
4220         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4221                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4222                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4223                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4224                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4225                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4226                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4227                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4228                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4229                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4230                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4231                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4232                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4233                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4234                 </fields>
4235                 <links>
4236                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4237                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4238                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4239                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4240                 </links>
4241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242             <actions>
4243                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4244                 <retrieve/>
4245                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4246                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4247             </actions>
4248         </permacrud>
4249         </class>
4250         <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">
4251                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4252                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4253                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4254                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4255                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4256             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4257             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4258             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4259                 </fields>
4260                 <links>
4261                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4262                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4263                 </links>
4264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4265             <actions>
4266                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4267                 <retrieve/>
4268                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4269                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4270             </actions>
4271         </permacrud>
4272         </class>
4273         <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">
4274                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4275                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4276             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4277             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4278                 </fields>
4279                 <links>
4280                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4281                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4282                 </links>
4283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4284             <actions>
4285                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4286                                         <context link="lgroup" field="owner" />
4287                 </create>
4288                 <retrieve/>
4289                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4290                                         <context link="lgroup" field="owner" />
4291                 </update>
4292                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4293                                         <context link="lgroup" field="owner" />
4294                 </delete>
4295             </actions>
4296         </permacrud>
4297         </class>
4298
4299     <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">
4300         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4301             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4302             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4303             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4304             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4305         </fields>
4306         <links>
4307             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4308             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4309         </links>
4310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4311             <actions>
4312                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4313                 <retrieve/>
4314                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4315                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4316             </actions>
4317         </permacrud>
4318     </class>
4319
4320         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4321                 <fields>
4322                         <field name="sre_id" oils_persist:virtual="true" />
4323                         <field name="location" oils_persist:virtual="true" />
4324                         <field name="owning_lib" oils_persist:virtual="true" />
4325                         <field name="basic_holdings" oils_persist:virtual="true" />
4326                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4327                         <field name="supplement_holdings" oils_persist:virtual="true" />
4328                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4329                         <field name="index_holdings" oils_persist:virtual="true" />
4330                         <field name="index_holdings_add" oils_persist:virtual="true" />
4331                         <field name="online" oils_persist:virtual="true" />
4332                         <field name="missing" oils_persist:virtual="true" />
4333                         <field name="incomplete" oils_persist:virtual="true" />
4334                 </fields>
4335         </class>
4336
4337         <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">
4338                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4339                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4340                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4341                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4342                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4343                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4344                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4345                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4346                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4347                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4348                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4349                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4350                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4351                 </fields>
4352                 <links>
4353                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4354                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4355                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4356                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4357                 </links>
4358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359                         <actions>
4360                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4361                                 <retrieve/>
4362                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4363                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4364                         </actions>
4365                 </permacrud>
4366         </class>
4367
4368         <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">
4369                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4370                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4371                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4372                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4373                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4375                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4376                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4377                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4380                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4381                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4382                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4383                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4385                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4386                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4387                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4388                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4389                 </fields>
4390                 <links>
4391                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4392                 </links>
4393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4394                         <actions>
4395                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4396                                         <context link="subscription" field="owning_lib" />
4397                                 </create>
4398                                 <retrieve />
4399                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4400                                         <context link="subscription" field="owning_lib" />
4401                                 </update>
4402                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4403                                         <context link="subscription" field="owning_lib" />
4404                                 </delete>
4405                         </actions>
4406                 </permacrud>
4407         </class>
4408
4409         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4410                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4411                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4412                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4413                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4414                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4415                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4416                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4417                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4419                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4420                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4421                 </fields>
4422                 <links>
4423                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4424                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4425                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4426                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4427                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4428                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4429                 </links>
4430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4431                         <actions>
4432                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4433                                 <retrieve />
4434                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4435                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4436                         </actions>
4437                 </permacrud>
4438         </class>
4439
4440         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4441                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4442                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4443                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4444                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4445                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4446                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4447                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4448                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4449                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4450                 </fields>
4451                 <links>
4452                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4453                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4454                 </links>
4455         </class>
4456
4457         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4458                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4459                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4460                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4461                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4462                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4463                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4464                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4465                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4466                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4467                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4468                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4469                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4470                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4471                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4472                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4474                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4476                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4477                 </fields>
4478                 <links>
4479                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4480                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4481                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4482                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4483                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4484                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4485                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4486                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4487                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4488                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4489                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4490                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4491                 </links>
4492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4493                         <actions>
4494                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4495                                 <retrieve />
4496                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4497                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4498                         </actions>
4499                 </permacrud>
4500         </class>
4501
4502         <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">
4503                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4504                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4505                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4506                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4507                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4508                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4509                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4510                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4511                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4512                 </fields>
4513                 <links>
4514                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4515                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4516                 </links>
4517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4518                         <actions>
4519                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4520                                         <context link="distribution" field="holding_lib" />
4521                                 </create>
4522                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4523                                         <context link="distribution" field="holding_lib" />
4524                                 </retrieve>
4525                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4526                                         <context link="distribution" field="holding_lib" />
4527                                 </update>
4528                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4529                                         <context link="distribution" field="holding_lib" />
4530                                 </delete>
4531                         </actions>
4532                 </permacrud>
4533         </class>
4534
4535         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4536                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4538                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4539                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4540                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4541                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4542                 </fields>
4543                 <links>
4544                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4545                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4546                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4547                 </links>
4548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4549                         <actions>
4550                                 <create permission="ADMIN_SERIAL_STREAM">
4551                                         <context link="distribution" field="holding_lib" />
4552                                 </create>
4553                                 <retrieve />
4554                                 <update permission="ADMIN_SERIAL_STREAM">
4555                                         <context link="distribution" field="holding_lib" />
4556                                 </update>
4557                                 <delete permission="ADMIN_SERIAL_STREAM">
4558                                         <context link="distribution" field="holding_lib" />
4559                                 </delete>
4560                         </actions>
4561                 </permacrud>
4562         </class>
4563
4564         <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">
4565                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4566                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4567                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4568                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4569                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4570                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4571                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4572                 </fields>
4573                 <links>
4574                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4575                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4576                 </links>
4577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4578                         <actions>
4579                                 <create permission="ADMIN_SERIAL_STREAM">
4580                                         <context link="stream" jump="distribution" field="holding_lib" />
4581                                 </create>
4582                                 <retrieve permission="RECEIVE_SERIAL">
4583                                         <context link="stream" jump="distribution" field="holding_lib" />
4584                                 </retrieve>
4585                                 <update permission="ADMIN_SERIAL_STREAM">
4586                                         <context link="stream" jump="distribution" field="holding_lib" />
4587                                 </update>
4588                                 <delete permission="ADMIN_SERIAL_STREAM">
4589                                         <context link="stream" jump="distribution" field="holding_lib" />
4590                                 </delete>
4591                         </actions>
4592                 </permacrud>
4593         </class>
4594
4595         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4596                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4597                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4598                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4599                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4600                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4601                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4602                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4603                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4604                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4605                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4606                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4607                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4608                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4609                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4610                 </fields>
4611                 <links>
4612                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4613                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4614                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4615                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4616                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4617                 </links>
4618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4619                         <actions>
4620                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4621                                         <context link="subscription" field="owning_lib" />
4622                                 </create>
4623                                 <retrieve/>
4624                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4625                                         <context link="subscription" field="owning_lib" />
4626                                 </update>
4627                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4628                                         <context link="subscription" field="owning_lib" />
4629                                 </delete>
4630                         </actions>
4631                 </permacrud>
4632         </class>
4633
4634         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4636                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4637                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4638                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4639                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4640                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4641                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4642                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4643                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4644                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4645                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4646                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4647                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4648                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4649                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4650                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4651                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4652                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4653                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4654                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4655                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4656                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4657                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4658                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4659                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4660                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4661                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4662                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4663                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4664                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4665                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4666                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4667                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4668                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4669                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4670                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4671                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4672                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4674                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4675                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4676                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4677                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4678                 </fields>
4679                 <links>
4680                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4681                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4682                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4683                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4685                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4686                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4687                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4688                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4689                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4690                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4691                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4692                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4693                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4694                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4695                 </links>
4696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4697                         <actions>
4698                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4699                                 <retrieve/>
4700                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4701                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4702                         </actions>
4703                 </permacrud>
4704         </class>
4705
4706         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4707                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4708                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4709                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4710                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4711                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4712                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4714                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4715                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4716                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4717                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4718                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4720                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4721                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4722                 </fields>
4723                 <links>
4724                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4725                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4726                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4727                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4728                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4729                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4730                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4731                 </links>
4732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4733                         <actions>
4734                                 <create permission="ADMIN_SERIAL_ITEM">
4735                                         <context link="stream" jump="distribution" field="holding_lib" />
4736                                 </create>
4737                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4738                                         <context link="stream" jump="distribution" field="holding_lib" />
4739                                 </retrieve>
4740                                 <update permission="ADMIN_SERIAL_ITEM">
4741                                         <context link="stream" jump="distribution" field="holding_lib" />
4742                                 </update>
4743                                 <delete permission="ADMIN_SERIAL_ITEM">
4744                                         <context link="stream" jump="distribution" field="holding_lib" />
4745                                 </delete>
4746                         </actions>
4747                 </permacrud>
4748         </class>
4749
4750         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4751                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4752                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4753                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4754                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4755                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4756                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4757                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4758                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4759                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4760                 </fields>
4761                 <links>
4762                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4763                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4764                 </links>
4765                 <!-- Not available via PCRUD at this time -->
4766         </class>
4767         <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">
4768                 <fields>
4769                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4770                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4771                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4772                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4773                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4774                 </fields>
4775                 <links>
4776                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4777                 </links>
4778         </class>
4779         <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">
4780                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4781                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4782                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4783                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4784                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4785                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4786                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4787                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4788                 </fields>
4789                 <links>
4790                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4791                 </links>
4792         </class>
4793         <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">
4794                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4795                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4796                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4797                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4798                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4799                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4800                 </fields>
4801                 <links>
4802                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4803                 </links>
4804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4805                         <actions>
4806                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4807                                         <context link="distribution" field="holding_lib" />
4808                                 </create>
4809                                 <retrieve/>
4810                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4811                                         <context link="distribution" field="holding_lib" />
4812                                 </update>
4813                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4814                                         <context link="distribution" field="holding_lib" />
4815                                 </delete>
4816                         </actions>
4817                 </permacrud>
4818         </class>
4819
4820         <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">
4821                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4822                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4823                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4824                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4825                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4826                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4827                 </fields>
4828                 <links>
4829                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4830                 </links>
4831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4832                         <actions>
4833                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4834                                         <context link="distribution" field="holding_lib" />
4835                                 </create>
4836                                 <retrieve/>
4837                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4838                                         <context link="distribution" field="holding_lib" />
4839                                 </update>
4840                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4841                                         <context link="distribution" field="holding_lib" />
4842                                 </delete>
4843                         </actions>
4844                 </permacrud>
4845         </class>
4846
4847         <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">
4848                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4849                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4850                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4851                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4852                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4853                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4854                 </fields>
4855                 <links>
4856                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4857                 </links>
4858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4859                         <actions>
4860                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4861                                         <context link="distribution" field="holding_lib" />
4862                                 </create>
4863                                 <retrieve/>
4864                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4865                                         <context link="distribution" field="holding_lib" />
4866                                 </update>
4867                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4868                                         <context link="distribution" field="holding_lib" />
4869                                 </delete>
4870                         </actions>
4871                 </permacrud>
4872         </class>
4873
4874         <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">
4875                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4876                         <field name="id" reporter:datatype="id" />
4877                         <field name="owning_copy" reporter:datatype="link"/>
4878                         <field name="stat_cat" reporter:datatype="link"/>
4879                         <field name="stat_cat_entry" reporter:datatype="link"/>
4880                 </fields>
4881                 <links>
4882                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4883                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4884                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4885                 </links>
4886         </class>
4887         <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">
4888                 <fields oils_persist:primary="code">
4889                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4890                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4891                 </fields>
4892                 <links/>
4893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4894             <actions>
4895                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4896                 <retrieve/>
4897                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4898                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4899             </actions>
4900         </permacrud>
4901         </class>
4902         <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">
4903                 <fields oils_persist:primary="code">
4904                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4905                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4906                 </fields>
4907                 <links/>
4908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4909             <actions>
4910                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4911                 <retrieve/>
4912                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4913                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4914             </actions>
4915         </permacrud>
4916         </class>
4917         <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">
4918                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4919                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4920                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4921                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4922                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4923                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4924                 </fields>
4925                 <links>
4926             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4927         </links>
4928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4929             <actions>
4930                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4931                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4932                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4933                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4934             </actions>
4935         </permacrud>
4936         </class>
4937         <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">
4938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4939                         <field name="id" reporter:datatype="id" />
4940                         <field name="name" reporter:datatype="text"/>
4941                 </fields>
4942                 <links/>
4943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4944             <actions>
4945                 <create permission="CREATE_LASSO" global_required="true"/>
4946                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4947                 <update permission="UPDATE_LASSO" global_required="true"/>
4948                 <delete permission="DELETE_LASSO" global_required="true"/>
4949             </actions>
4950         </permacrud>
4951         </class>
4952         <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">
4953                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4954                         <field name="id" reporter:datatype="id" />
4955                         <field name="lasso" reporter:datatype="link"/>
4956                         <field name="org_unit" reporter:datatype="org_unit"/>
4957                 </fields>
4958                 <links>
4959                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4960                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4961                 </links>
4962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4963             <actions>
4964                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4965                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4966                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4967                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4968             </actions>
4969         </permacrud>
4970         </class>
4971         <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">
4972                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4973                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4974                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4975                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4976                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4977                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4978                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4979                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4980                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4981                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4982                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4983                 </fields>
4984                 <links>
4985                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4986                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4987                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4988                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4989                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4990                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4991                 </links>
4992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4993             <actions>
4994                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4995                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4996                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4997                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4998             </actions>
4999         </permacrud>
5000         </class>
5001         <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">
5002                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5003                         <field name="id" reporter:datatype="id" />
5004                         <field name="from_org" reporter:datatype="org_unit"/>
5005                         <field name="to_org" reporter:datatype="org_unit"/>
5006                         <field name="prox" reporter:datatype="int" />
5007                 </fields>
5008                 <links>
5009                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5010                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5011                 </links>
5012         </class>
5013         <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">
5014                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5015                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5016                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5017                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5018                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5019                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5020                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5021                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5022                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5023                 </fields>
5024                 <links/>
5025         </class>
5026         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5027                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5028                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5030                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5031                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5033                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5034                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5035                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5036                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5037                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5038                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5039                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5040                 </fields>
5041                 <links>
5042                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5043                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5044                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5045                 </links>
5046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5047             <actions>
5048                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5049                 <retrieve/>
5050                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5051                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5052             </actions>
5053         </permacrud>
5054         </class>
5055         <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">
5056                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5057                         <field name="address_type"  reporter:datatype="text"/>
5058                         <field name="city"  reporter:datatype="text"/>
5059                         <field name="country"  reporter:datatype="text"/>
5060                         <field name="county"  reporter:datatype="text"/>
5061                         <field name="id" reporter:datatype="id" />
5062                         <field name="org_unit" reporter:datatype="org_unit"/>
5063                         <field name="post_code"  reporter:datatype="text"/>
5064                         <field name="state"  reporter:datatype="text"/>
5065                         <field name="street1"  reporter:datatype="text"/>
5066                         <field name="street2"  reporter:datatype="text"/>
5067                         <field name="valid" reporter:datatype="bool"/>
5068                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5069                 </fields>
5070                 <links>
5071                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5072                 </links>
5073         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5074             <actions>
5075                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5076                 <retrieve/>
5077                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5078                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5079             </actions>
5080         </permacrud>
5081         </class>
5082         <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">
5083                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5084                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5085                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5086                         <field name="query_text" reporter:datatype="text"/>
5087                 </fields>
5088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5089             <actions>
5090                 <retrieve/>
5091             </actions>
5092         </permacrud>
5093         </class>
5094
5095         <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">
5096                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5097                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5098                         <field name="owner" reporter:datatype="org_unit"/>
5099                         <field name="code" reporter:datatype="text"/>
5100                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5101                         <field name="create_date" reporter:datatype="timestamp"/>
5102                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5103                 </fields>
5104                 <links>
5105                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5106                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5107                 </links>
5108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5109             <actions>
5110                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5111                 <retrieve/>
5112                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5113                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5114             </actions>
5115         </permacrud>
5116         </class>
5117         <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">
5118                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5119                         <field name="id" reporter:datatype="id"/>
5120                         <field name="grp" reporter:datatype="link"/>
5121                         <field name="pos" reporter:datatype="int"/>
5122                         <field name="query" reporter:datatype="link"/>
5123                 </fields>
5124                 <links>
5125                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5126                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5127                 </links>
5128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5129             <actions>
5130                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5131                     <context link="grp" field="owner"/>
5132                 </create>
5133                 <retrieve/>
5134                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5135                     <context link="grp" field="owner"/>
5136                 </update>
5137                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5138                     <context link="grp" field="owner"/>
5139                 </delete>
5140             </actions>
5141         </permacrud>
5142         </class>
5143
5144         <!-- A note: Please update alhr and ahopl when updating ahr -->
5145         <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">
5146                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5147                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5148                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5149                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5151                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5152                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5153                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5154                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5155                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5157                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5158                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5159                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5160                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5161                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5162                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5163                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5164                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5165                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5166                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5167                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5168                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5169                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5170                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5171                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5174                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5175                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5176                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5177                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5178                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5181                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5182                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5183                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5184                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5185                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5186                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5187                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5188                 </fields>
5189                 <links>
5190                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5192                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5193                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5194                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5197                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5199                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5200                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5201                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5202                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5203                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5204                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5205                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5206                 </links>
5207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5208                         <actions>
5209                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5210                         </actions>
5211                 </permacrud>
5212         </class>
5213         <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">
5214                 <oils_persist:source_definition><![CDATA[
5215                 SELECT
5216                         ahr.*,
5217                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5218                                 copy_location_order_position,
5219                         CASE WHEN au.alias IS NOT NULL THEN
5220                                 au.alias
5221                         ELSE
5222                                 au.first_given_name
5223                         END AS usr_alias_or_first_given_name,
5224                         au.first_given_name AS usr_first_given_name,
5225                         au.second_given_name AS usr_second_given_name,
5226                         au.family_name AS usr_family_name,
5227                         au.prefix AS usr_prefix,
5228                         au.suffix AS usr_suffix,
5229                         au.alias AS usr_alias,
5230                         CASE WHEN au.alias IS NOT NULL THEN
5231                                 au.alias
5232                         ELSE
5233                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5234                                         COALESCE(au.family_name, ''),
5235                                         COALESCE(au.suffix, ''),
5236                                         ', ',
5237                                         COALESCE(au.prefix, ''),
5238                                         COALESCE(au.first_given_name, ''),
5239                                         COALESCE(au.second_given_name, '')
5240                                 ], ' '), E'\\s+,', ',')
5241                         END AS usr_alias_or_display_name,
5242                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5243                                 COALESCE(au.family_name, ''),
5244                                 COALESCE(au.suffix, ''),
5245                                 ', ',
5246                                 COALESCE(au.prefix, ''),
5247                                 COALESCE(au.first_given_name, ''),
5248                                 COALESCE(au.second_given_name, '')
5249                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5250                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5251                                 AS call_number_label,
5252                         siss.label AS issuance_label,
5253                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5254                         ahcm_1.copy_count AS potential_copies
5255                 FROM action.hold_request ahr
5256                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5257                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5258                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5259                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5260                 JOIN actor.usr au ON (au.id = ahr.usr)
5261                 JOIN (
5262                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5263                         FROM asset.copy_location
5264                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5265                 LEFT JOIN actor.usr_standing_penalty ausp 
5266                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5267                 LEFT JOIN config.standing_penalty csp
5268                         ON (
5269                                 csp.id = ausp.standing_penalty AND 
5270                                 csp.block_list LIKE '%CAPTURE%' AND (
5271                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5272                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5273                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5274                                         )
5275                                 )
5276                         )
5277                 JOIN (
5278                         SELECT COUNT(target_copy) AS copy_count, hold
5279                         FROM action.hold_copy_map
5280                         GROUP BY 2
5281                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5282                 LEFT JOIN serial.issuance siss
5283                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5284                 LEFT JOIN asset.copy_location_order acplo
5285                         ON (acp.location = acplo.location AND
5286                                 acp.circ_lib = acplo.org)
5287                 WHERE
5288                         ahr.capture_time IS NULL AND
5289                         ahr.cancel_time IS NULL AND
5290                         csp.id IS NULL AND
5291                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5292                 ]]></oils_persist:source_definition>
5293                 <fields oils_persist:primary="id">
5294                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5295                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5296                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5297                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5298                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5299                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5300                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5301                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5302                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5303                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5304                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5305                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5306                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5307                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5308                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5309                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5310                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5311                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5312                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5314                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5315                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5316                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5317                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5318                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5321                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5323                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5324                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5325                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5327                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5328                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5329                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5330                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5331                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5332                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5333                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5334                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5335                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5336                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5337                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5338                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5339                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5340                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5341                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5342                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5343                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5344                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5345                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5346                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5347                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5348                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5349                 </fields>
5350                 <links>
5351                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5352                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5353                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5355                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5356                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5357                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5358                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5359                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5360                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5361                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5362                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5363                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5364                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5365                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5366                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5367                 </links>
5368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5369                         <actions>
5370                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5371                         </actions>
5372                 </permacrud>
5373         </class>
5374         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5375                 <oils_persist:source_definition>
5376                         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)
5377                 </oils_persist:source_definition>
5378                 <fields oils_persist:primary="id">
5379                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5380                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5381                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5382                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5383                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5384                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5385                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5386                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5387                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5388                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5389                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5390                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5391                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5392                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5393                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5394                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5395                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5396                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5397                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5398                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5399                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5400                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5401                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5403                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5404                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5405                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5406                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5407                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5408                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5409                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5410                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5411                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5412                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5413                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5414                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5415                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5416                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5417                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5418                 </fields>
5419                 <links>
5420                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5421                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5422                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5423                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5424                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5425                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5426                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5427                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5428                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5429                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5430                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5431                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5432                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5433                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5434                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5435                 </links>
5436         </class>
5437
5438         <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">
5439                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5440                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5441                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5442                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5443                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5444                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5445                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5446                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5447                 </fields>
5448                 <links>
5449                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5450                 </links>
5451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5452                         <actions>
5453                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5454                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5455                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5456                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5457                         </actions>
5458                 </permacrud>
5459         </class>
5460         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
5461                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5462                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5463                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5464                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5465                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5466                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5467                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5468                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5469                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5470                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5471                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5472                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5473                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5474                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5475                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5476                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5477                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5478                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5479                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5480                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5481                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5482                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5483                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5484                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5485                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5486                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5487                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5488                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5489                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5490                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5491                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5492                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5493                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5494                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5495                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5496                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5497                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5498                 </fields>
5499                 <links>
5500                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5501                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5502                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5503                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5504                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5505                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5506                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5507                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5508                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5509                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5510                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5511                 </links>
5512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5513                         <actions>
5514                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5515                         </actions>
5516                 </permacrud>
5517         </class>
5518         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
5519                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5520                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5521                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5522                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5523                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5524                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5525                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5526                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5527                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5528                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5529                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5530                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5531                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5532                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5533                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5534                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5535                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5536                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5537                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5538                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5539                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5540                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5541                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5542                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5543                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5544                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5545                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5547                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5548                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5549                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5551                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5552                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5553                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5554                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5555                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5556                 </fields>
5557                 <links>
5558                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5560                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5562                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5563                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5564                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5565                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5566                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5567                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5568                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5569                 </links>
5570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5571                         <actions>
5572                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5573                         </actions>
5574                 </permacrud>
5575         </class>
5576
5577         <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">
5578                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5579                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5580                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5581                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5582                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5583                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5584                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5585                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5586                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5587                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5588                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5589                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5590                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5591                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5592                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5593                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5601                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5602                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5603                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5604                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5605                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5606                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5607                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5608                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5609                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5610                 </fields>
5611                 <links>
5612                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5613                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5614                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5615                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5616                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5617                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5618                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5619                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5620                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5621                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5622                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5623                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5624                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5625                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5626                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5627                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5628                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5629                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5630                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5631                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5632                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5633                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5634                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5635                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5636                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5637                 </links>
5638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5639             <actions>
5640                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5641                 <retrieve />
5642                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5643                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5644             </actions>
5645         </permacrud>
5646         </class>
5647         <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">
5648                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5649                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5650                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5651                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5652                 </fields>
5653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5654                         <actions>
5655                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5656                                 <retrieve/>
5657                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5658                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5659                         </actions>
5660                 </permacrud>
5661         </class>
5662         <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">
5663                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5664                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5665                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5666                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5667                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5668                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5669                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5670                 </fields>
5671                 <links>
5672                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5673                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5674                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5675                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5676                 </links>
5677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5678                         <actions>
5679                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5680                                 <retrieve/>
5681                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5682                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5683                         </actions>
5684                 </permacrud>
5685         </class>
5686         <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">
5687                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5688                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5689                         <field name="btype" reporter:datatype="text"/>
5690                         <field name="id" reporter:datatype="id" />
5691                         <field name="name"  reporter:datatype="text"/>
5692                         <field name="description" reporter:datatype="text"/>
5693                         <field name="owner" reporter:datatype="link"/>
5694                         <field name="pub" reporter:datatype="bool"/>
5695                         <field name="create_time" reporter:datatype="timestamp" />
5696                 </fields>
5697                 <links>
5698                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5699                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5700                 </links>
5701         </class>
5702         <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">
5703                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5704                         <field name="id" reporter:datatype="id" />
5705                         <field name="bucket" reporter:datatype="link"/>
5706                         <field name="note" reporter:datatype="text" />
5707                 </fields>
5708                 <links>
5709                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5710                 </links>
5711         </class>
5712         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5713                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5714                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5715                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5716                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5717                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5718                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5719                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5720                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5721                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5722                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5723                 </fields>
5724                 <links>
5725                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5726                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5727                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5728                 </links>
5729         </class>
5730         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5732                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5733                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5734                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5735                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5736                 </fields>
5737                 <links>
5738                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5739                 </links>
5740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741                         <actions>
5742                                 <retrieve permission="VIEW_USER">
5743                                         <context link="usr" field="home_ou" />
5744                                 </retrieve>
5745                         </actions>
5746                 </permacrud>
5747         </class>
5748     <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">
5749         <fields oils_persist:primary="field">
5750             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5751             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5752             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5753         </fields>
5754         <links/>
5755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5756             <actions>
5757                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5758                 <retrieve />
5759                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5760                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5761             </actions>
5762         </permacrud>
5763     </class>
5764         <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">
5765                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5766                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5767                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5768                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5769                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5770                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5771                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5772                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5773                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5774                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5775                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5776                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5777                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5778                 </fields>
5779                 <links>
5780                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5781                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5782                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5783                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5784                 </links>
5785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5786             <actions>
5787                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5788                 <retrieve />
5789                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5790                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5791             </actions>
5792         </permacrud>
5793         </class>
5794         <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">
5795                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5796                         <field name="field" reporter:datatype="link"/>
5797                         <field name="id" reporter:datatype="id" />
5798                         <field name="source" reporter:datatype="link"/>
5799                         <field name="value"  reporter:datatype="text"/>
5800                 </fields>
5801                 <links>
5802                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5803                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5804                 </links>
5805         </class>
5806         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5807                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5808                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5809                         <field name="btype" reporter:datatype="text"/>
5810                         <field name="id" reporter:datatype="id" />
5811                         <field name="name"  reporter:datatype="text"/>
5812                         <field name="description" reporter:datatype="text"/>
5813                         <field name="owner" reporter:datatype="link"/>
5814                         <field name="pub" reporter:datatype="bool"/>
5815                         <field name="create_time" reporter:datatype="timestamp" />
5816                 </fields>
5817                 <links>
5818                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5819                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5820                 </links>
5821         </class>
5822         <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">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5824                         <field name="id" reporter:datatype="id" />
5825                         <field name="bucket" reporter:datatype="link"/>
5826                         <field name="note" reporter:datatype="text" />
5827                 </fields>
5828                 <links>
5829                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5830                 </links>
5831         </class>
5832         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5834                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5835                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5836                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5837                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5838                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5839                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5840                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5841                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5842                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5843                 </fields>
5844                 <links>
5845                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5846                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5847                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5848                 </links>
5849         </class>
5850         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5851                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5852                         <field name="id" reporter:datatype="id" />
5853                         <field name="ind1" />
5854                         <field name="ind2" />
5855                         <field name="record" />
5856                         <field name="subfield" />
5857                         <field name="tag" />
5858                         <field name="value" />
5859                 </fields>
5860                 <links>
5861                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5862                 </links>
5863         </class>
5864         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
5865                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5866                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5867                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
5868                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
5869                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
5870                 </fields>
5871                 <links>
5872                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
5873                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
5874                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
5875                 </links>
5876         </class>
5877         <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">
5878                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5879                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5880                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5881                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5882                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5883                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5884                 </fields>
5885                 <links>
5886                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5887                 </links>
5888         </class>
5889         <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">
5890                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5891                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5893                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5894                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5895                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5896                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5897                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5898                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5899                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5900                 </fields>
5901                 <links>
5902                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5903                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5904                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5905                 </links>
5906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907             <actions>
5908                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5909                 <retrieve/>
5910                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5911                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5912             </actions>
5913         </permacrud>
5914         </class>
5915         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5916                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5917                         <field name="create_date" reporter:datatype="timestamp"/>
5918                         <field name="creator" reporter:datatype="link"/>
5919                         <field name="edit_date" reporter:datatype="timestamp"/>
5920                         <field name="editor" reporter:datatype="link"/>
5921                         <field name="id" reporter:datatype="id" />
5922                         <field name="pub" reporter:datatype="bool"/>
5923                         <field name="record" reporter:datatype="link"/>
5924                         <field name="value"  reporter:datatype="text"/>
5925                 </fields>
5926                 <links>
5927                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5928                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5929                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5930                 </links>
5931         </class>
5932         <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">
5933                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5934                         <field name="balance_owed" reporter:datatype="money" />
5935                         <field name="total_owed" reporter:datatype="money" />
5936                         <field name="total_paid" reporter:datatype="money" />
5937                         <field name="usr" reporter:datatype="link"/>
5938                 </fields>
5939                 <links>
5940                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5941                 </links>
5942         </class>
5943         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5944                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5945                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5946                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5947                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5948                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5949                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5950                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5951                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5952                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5953                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5954                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5955                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5956                 </fields>
5957                 <links>
5958                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5959                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5960                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5961                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5962                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5963                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5964                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5965                 </links>
5966         </class>
5967         <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">
5968                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5969                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5970                         <field name="quality" reporter:datatype="int" />
5971                         <field name="source" reporter:datatype="text"/>
5972                         <field name="transcendant" reporter:datatype="bool"/>
5973                         <field name="can_have_copies" reporter:datatype="bool"/>
5974                 </fields>
5975                 <links/>
5976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5977             <actions>
5978                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5979                 <retrieve/>
5980                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5981                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5982             </actions>
5983         </permacrud>
5984         </class>
5985         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5986                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5987                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5988                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5989                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5990                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5991                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5992                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5993                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5994                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5995                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5996                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5997                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5998                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5999                 </fields>
6000                 <links>
6001                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6002                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6004                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6005                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6006                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6007                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6008                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6009                 </links>
6010         </class>
6011         <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">
6012                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6013                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6014                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6015                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6016                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6017                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6018                 </fields>
6019                 <links>
6020                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6021                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6022                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6023                 </links>
6024         </class>
6025         <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">
6026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6027                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6028                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6029                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6030                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6031                 </fields>
6032                 <links>
6033                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6035                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6036                 </links>
6037         </class>
6038         <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">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6040                         <field name="bucket" reporter:datatype="link"/>
6041                         <field name="id" reporter:datatype="id" />
6042                         <field name="target_user" reporter:datatype="link"/>
6043                         <field name="create_time" reporter:datatype="timestamp" />
6044                         <field name="pos" reporter:datatype="int" />
6045                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6046                 </fields>
6047                 <links>
6048                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6049                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6050             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6051                 </links>
6052         </class>
6053         <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">
6054                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6055                         <field name="id" reporter:datatype="id" />
6056                         <field name="item" reporter:datatype="link"/>
6057                         <field name="note" reporter:datatype="text" />
6058                 </fields>
6059                 <links>
6060                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6061                 </links>
6062         </class>
6063         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6064                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6065                         <field name="balance_owed" reporter:datatype="money" />
6066                         <field name="total_owed" reporter:datatype="money" />
6067                         <field name="total_paid" reporter:datatype="money" />
6068                         <field name="usr" reporter:datatype="link"/>
6069                 </fields>
6070                 <links>
6071                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6072                 </links>
6073         </class>
6074         <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">
6075                 <fields oils_persist:primary="code" oils_persist:sequence="">
6076                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6077                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6078                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6079                 </fields>
6080                 <links/>
6081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6082             <actions>
6083                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6084                 <retrieve/>
6085                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6086                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6087             </actions>
6088         </permacrud>
6089         </class>
6090         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6091                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6092                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6093                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6094                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6095                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6096                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6097                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6098                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6099                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6100                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6101                 </fields>
6102                 <links>
6103                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6104                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6105                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6106                 </links>
6107         </class>
6108         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6109                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6110                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6111                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6112                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6113                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6114                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6115                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6116                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6117                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6118                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6119                 </fields>
6120                 <links>
6121                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6122                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6123                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6124                 </links>
6125         </class>
6126         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6127                 <fields oils_persist:primary="id" oils_persist:sequence="">
6128                         <field name="checkin_lib" reporter:datatype="link"/>
6129                         <field name="checkin_staff" reporter:datatype="link"/>
6130                         <field name="checkin_time" reporter:datatype="timestamp"/>
6131                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6132                         <field name="circ_staff" reporter:datatype="link"/>
6133                         <field name="desk_renewal" reporter:datatype="bool"/>
6134                         <field name="due_date" reporter:datatype="timestamp"/>
6135                         <field name="duration" reporter:datatype="interval"/>
6136                         <field name="duration_rule" reporter:datatype="link"/>
6137                         <field name="fine_interval" reporter:datatype="interval"/>
6138                         <field name="id" reporter:datatype="id" />
6139                         <field name="max_fine" reporter:datatype="money" />
6140                         <field name="max_fine_rule" reporter:datatype="link"/>
6141                         <field name="opac_renewal" reporter:datatype="bool"/>
6142                         <field name="phone_renewal" reporter:datatype="bool"/>
6143                         <field name="recurring_fine" reporter:datatype="money" />
6144                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6145                         <field name="renewal_remaining" reporter:datatype="int" />
6146             <field name="grace_period" reporter:datatype="interval" />
6147                         <field name="stop_fines" reporter:datatype="text"/>
6148                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6149                         <field name="target_copy" reporter:datatype="link"/>
6150                         <field name="usr" reporter:datatype="link"/>
6151                         <field name="xact_finish" reporter:datatype="timestamp" />
6152                         <field name="xact_start" reporter:datatype="timestamp" />
6153                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6154                 </fields>
6155                 <links>
6156                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6157                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6158                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6159                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6160                 </links>
6161         </class>
6162         <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">
6163                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6164                         <field name="field" reporter:datatype="link"/>
6165                         <field name="id" reporter:datatype="id" />
6166                         <field name="source" reporter:datatype="link"/>
6167                         <field name="value" reporter:datatype="text"/>
6168                 </fields>
6169                 <links>
6170                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6171                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6172                 </links>
6173         </class>
6174         <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">
6175                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6176                         <field name="high" reporter:datatype="money" />
6177                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6178                         <field name="low" reporter:datatype="money" />
6179                         <field name="name" reporter:datatype="text"/>
6180                         <field name="normal" reporter:datatype="money" />
6181                         <field name="recurrence_interval" reporter:datatype="interval"/>
6182             <field name="grace_period" reporter:datatype="interval" />
6183                 </fields>
6184                 <links/>
6185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6186             <actions>
6187                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6188                 <retrieve/>
6189                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6190                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6191             </actions>
6192         </permacrud>
6193         </class>
6194         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6195                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6196                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6197                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6198                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6199                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6200                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6201                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6202                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6203                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6204                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6205                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6206                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6207                 </fields>
6208                 <links>
6209                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6210                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6211                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6212                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6213                 </links>
6214         </class>
6215         <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">
6216                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6217                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6218                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6219                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6220                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6221                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6222                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6223                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6224                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6225                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6226                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6227                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6228                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6229                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6230                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6231                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6232                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6233                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6234                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6235                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6236                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6237                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6238                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6239                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6240                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6241                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6242                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6243                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6244                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6245                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6246                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6247                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6248                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6249                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6250                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6251                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6252                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6253                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6254                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6255                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6256                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6257                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6258                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6260                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6261                 </fields>
6262                 <links>
6263                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6264                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6265                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6266                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6267                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6268                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6269                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6270                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6271                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6272                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6273                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6274                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6275                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6276                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6277                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6278                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6279                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6280                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6281                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6282                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6283                 </links>
6284         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6285             <actions>
6286                 <create permission="CREATE_COPY">
6287                     <context link="call_number" field="owning_lib"/>
6288                 </create>
6289                 <retrieve/>
6290                 <update permission="UPDATE_COPY">
6291                     <context link="call_number" field="owning_lib"/>
6292                 </update>
6293                 <delete permission="DELETE_COPY">
6294                     <context link="call_number" field="owning_lib"/>
6295                 </delete>
6296             </actions>
6297         </permacrud>
6298         </class>
6299
6300         <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">
6301                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6302                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6303                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6304                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6305                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6306                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6307                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6308                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6309                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6310                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6311                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6312                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6313                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6314                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6315                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6316                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6317                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6318                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6319                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6320                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6321                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6322                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6323                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6324                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6325                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6326                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6327                 </fields>
6328                 <links>
6329                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6330                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6331                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6332                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6333                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6334                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6335                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6336                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6337                 </links>
6338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6339                         <actions>
6340                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6341                                 <retrieve />
6342                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6343                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6344                         </actions>
6345                 </permacrud>
6346         </class>
6347
6348         <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">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6350                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6351                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6352                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6353                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6354                 </fields>
6355                 <links/>
6356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6357             <actions>
6358                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6359                 <retrieve/>
6360                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6361                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6362             </actions>
6363         </permacrud>
6364         </class>
6365         <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">
6366                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6367                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6368                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6369                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6370                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6371                 </fields>
6372                 <links/>
6373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6374             <actions>
6375                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6376                 <retrieve/>
6377                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6378                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6379             </actions>
6380         </permacrud>
6381         </class>
6382         <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">
6383                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6384                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6385                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6386                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6387                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6388                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6389                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6390                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6391                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6392                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6393                 </fields>
6394                 <links>
6395                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6396                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6397                 </links>
6398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6399             <actions>
6400                 <create permission="CREATE_PERM" global_required="true"/>
6401                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6402                 <update permission="UPDATE_PERM" global_required="true"/>
6403                 <delete permission="DELETE_PERM" global_required="true"/>
6404             </actions>
6405         </permacrud>
6406         </class>
6407         <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">
6408                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6409                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6410                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6411                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6412                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6413                 </fields>
6414                 <links>
6415                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6416                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6417                 </links>
6418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6419             <actions>
6420                 <create permission="ADMIN_SURVEY">
6421                     <context link="question" jump="survey" field="owner"/>
6422                 </create>
6423                 <retrieve/>
6424                 <update permission="ADMIN_SURVEY">
6425                     <context link="question" jump="survey" field="owner"/>
6426                 </update>
6427                 <delete permission="ADMIN_SURVEY">
6428                     <context link="question" jump="survey" field="owner"/>
6429                 </delete>
6430             </actions>
6431         </permacrud>
6432         </class>
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6435                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6436                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6437                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6438                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6439                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6440                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6441                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6442                 </fields>
6443                 <links>
6444                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6445                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6446                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6447                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6448                 </links>
6449         </class>
6450         <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">
6451                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6452                         <field name="balance_owed" reporter:datatype="money" />
6453                         <field name="total_owed" reporter:datatype="money" />
6454                         <field name="total_paid" reporter:datatype="money" />
6455                         <field name="usr" reporter:datatype="link"/>
6456                 </fields>
6457                 <links>
6458                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6459                 </links>
6460         </class>
6461         <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">
6462                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6463                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6464                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6465                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6466                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6467                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6468                 </fields>
6469                 <links>
6470                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6471                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6472                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6473                 </links>
6474         </class>
6475         <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">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6477                         <field name="field" reporter:datatype="link"/>
6478                         <field name="id" reporter:datatype="id" />
6479                         <field name="source" reporter:datatype="link"/>
6480                         <field name="value" reporter:datatype="text"/>
6481                 </fields>
6482                 <links>
6483                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6484                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6485                 </links>
6486         </class>
6487         <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">
6488                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6489                         <field name="field" reporter:datatype="link"/>
6490                         <field name="id" reporter:datatype="id" />
6491                         <field name="source" reporter:datatype="link"/>
6492                         <field name="value" reporter:datatype="text"/>
6493                 </fields>
6494                 <links>
6495                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6496                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6497                 </links>
6498         </class>
6499         <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">
6500                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6501                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6502                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6503                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6504                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6505                 </fields>
6506                 <links>
6507                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6508                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6509                 </links>
6510         </class>
6511         <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">
6512                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6513                         <field name="depth" reporter:datatype="int" />
6514                         <field name="grantable" reporter:datatype="bool"/>
6515                         <field name="grp" reporter:datatype="link"/>
6516                         <field name="id" reporter:datatype="id" />
6517                         <field name="perm" reporter:datatype="link"/>
6518                 </fields>
6519                 <links>
6520                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6521                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6522                 </links>
6523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6524             <actions>
6525                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6526                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6527                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6528                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6529             </actions>
6530         </permacrud>
6531         </class>
6532         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6533                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6534                         <field name="items" oils_persist:virtual="true" />
6535                         <field name="btype" reporter:datatype="text"/>
6536                         <field name="id" reporter:datatype="id" />
6537                         <field name="name" reporter:datatype="text"/>
6538                         <field name="description" reporter:datatype="text"/>
6539                         <field name="owner" reporter:datatype="link"/>
6540                         <field name="pub" reporter:datatype="bool"/>
6541                         <field name="create_time" reporter:datatype="timestamp" />
6542                 </fields>
6543                 <links>
6544                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6545                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6546                 </links>
6547         </class>
6548         <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">
6549                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6550                         <field name="id" reporter:datatype="id" />
6551                         <field name="bucket" reporter:datatype="link"/>
6552                         <field name="note" reporter:datatype="text" />
6553                 </fields>
6554                 <links>
6555                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6556                 </links>
6557         </class>
6558         <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">
6559                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6560                         <field name="id" reporter:datatype="int" />
6561                         <field name="usr" reporter:datatype="link"/>
6562                         <field name="work_ou" reporter:datatype="link"/>
6563                 </fields>
6564                 <links>
6565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6566                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6567                 </links>
6568         </class>
6569         <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">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6571                         <field name="depth" reporter:datatype="int"/>
6572                         <field name="grantable" reporter:datatype="bool"/>
6573                         <field name="id" reporter:datatype="id" />
6574                         <field name="perm" reporter:datatype="link"/>
6575                         <field name="usr" reporter:datatype="link"/>
6576                 </fields>
6577                 <links>
6578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6579                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6580                 </links>
6581         </class>
6582         <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">
6583                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6584                         <field name="object_id" reporter:datatype="text"/>
6585                         <field name="grantable" reporter:datatype="bool"/>
6586                         <field name="id" reporter:datatype="id" />
6587                         <field name="perm" reporter:datatype="link"/>
6588                         <field name="usr" reporter:datatype="link"/>
6589                         <field name="object_type" reporter:datatype="text"/>
6590                 </fields>
6591                 <links>
6592                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6593                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6594                 </links>
6595         </class>
6596         <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">
6597                 <fields oils_persist:primary="id" oils_persist:sequence="">
6598                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6599                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6600                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6601                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6602                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6603                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6604                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6605                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6606                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6607                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6608                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6609                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6610                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6611                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6612                 </fields>
6613                 <links>
6614                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6615                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6616                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6617                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6618                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6619                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6620                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6621                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6622                 </links>
6623         </class>
6624         <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">
6625                 <fields oils_persist:primary="id" oils_persist:sequence="">
6626                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6627                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6628                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6629                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6630                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6631                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6632                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6633                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6634                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6635                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6636                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6637                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6638                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6639                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6640                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6641                 </fields>
6642                 <links>
6643                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6644                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6645                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6646                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6647                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6648                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6649                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6650                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6651                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6652                 </links>
6653         </class>
6654         <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">
6655                 <fields oils_persist:primary="id" oils_persist:sequence="">
6656                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6657                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6658                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6659                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6660                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6661                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6662                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6663                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6664                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6666                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6667                 </fields>
6668                 <links>
6669                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6670                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6671                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6672                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6673                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6674                 </links>
6675         </class>
6676         <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">
6677                 <fields oils_persist:primary="id" oils_persist:sequence="">
6678                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6679                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6680                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6681                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6682                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6683                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6684                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6685                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6686                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6687                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6688                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6689                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6690                 </fields>
6691                 <links>
6692                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6693                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6694                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6695                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6696                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6698                 </links>
6699         </class>
6700         <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">
6701                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6702                         <field name="bucket" reporter:datatype="link"/>
6703                         <field name="id" reporter:datatype="id" />
6704                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6705                         <field name="create_time" reporter:datatype="timestamp" />
6706                         <field name="pos" reporter:datatype="int" />
6707                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6708                 </fields>
6709                 <links>
6710                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6711                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6712             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6713                 </links>
6714         </class>
6715         <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">
6716                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6717                         <field name="id" reporter:datatype="id" />
6718                         <field name="item" reporter:datatype="link"/>
6719                         <field name="note" reporter:datatype="text" />
6720                 </fields>
6721                 <links>
6722                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6723                 </links>
6724         </class>
6725         <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">
6726                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6727                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6728                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6729                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6730                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6731                 </fields>
6732                 <links>
6733                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6734                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6735                 </links>
6736         </class>
6737     <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">
6738         <fields oils_persist:primary="field">
6739             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6740             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6741             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6742         </fields>
6743         <links/>
6744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6745             <actions>
6746                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6747                 <retrieve />
6748                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6749                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6750             </actions>
6751         </permacrud>
6752     </class>
6753         <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">
6754                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6755                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6756                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6757                 </fields>
6758                 <links/>
6759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6760             <actions>
6761                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6762                 <retrieve/>
6763                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6764                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6765             </actions>
6766         </permacrud>
6767         </class>
6768
6769
6770         <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">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6772                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6773                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6774                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6775                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6776                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6777                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6778                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6779                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6780                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6781                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6782                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6783                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6784                 </fields>
6785                 <links>
6786                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6787                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6788                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6789                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6790                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6791                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6792                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6793                 </links>
6794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6795             <actions>
6796                 <create permission="TRANSIT_COPY">
6797                     <context link="target_copy" field="owner"/>
6798                 </create>
6799                 <retrieve/>
6800                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6801                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6802             </actions>
6803         </permacrud>
6804         </class>
6805         <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">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6807                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6808                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6809                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6810                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6811                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6812                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6813                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6814                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6815                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6816                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6817                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6818                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6819                 </fields>
6820                 <links>
6821                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6822                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6823                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6824                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6825                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6826                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6827                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6828                 </links>
6829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6830             <actions>
6831                 <create permission="TRANSIT_COPY" context_field="owner">
6832                     <context link="target_copy" field="circ_lib"/>
6833                 </create>
6834                 <retrieve/>
6835                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6836                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6837             </actions>
6838         </permacrud>
6839         </class>
6840         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6841                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6842                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6843                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6844                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6845                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6846                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6847                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6848                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6849                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6850                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6851                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6852                 </fields>
6853                 <links>
6854                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6855                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6856                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6857                 </links>
6858         </class>
6859         <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">
6860                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6861                         <field name="grp" />
6862                         <field name="id" reporter:datatype="id" />
6863                         <field name="usr" />
6864                 </fields>
6865                 <links>
6866                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6867                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6868                 </links>
6869         </class>
6870         <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">
6871                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6872                         <field name="id" reporter:datatype="id" />
6873                         <field name="fq_field" reporter:datatype="text"/>
6874                         <field name="identity_value" reporter:datatype="text"/>
6875                         <field name="translation" reporter:datatype="text"/>
6876                         <field name="string" reporter:datatype="text"/>
6877                 </fields>
6878                 <links>
6879                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6880                 </links>
6881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6882             <actions>
6883                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6884                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6885                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6886                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6887             </actions>
6888         </permacrud>
6889         </class>
6890         <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">
6891                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6892                         <field name="id" reporter:datatype="id" />
6893                         <field name="fm_class" reporter:datatype="text"/>
6894                         <field name="field" reporter:datatype="text"/>
6895                         <field name="owner" reporter:datatype="org_unit"/>
6896                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6897                 </fields>
6898                 <links>
6899                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6900                 </links>
6901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6902             <actions>
6903                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6904                 <retrieve/>
6905                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6906                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6907             </actions>
6908         </permacrud>
6909         </class>
6910         <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">
6911                 <fields oils_persist:primary="code">
6912                         <field name="code" reporter:datatype="id" />
6913                         <field name="marc_code" reporter:datatype="text"/>
6914                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6915                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6916                 </fields>
6917                 <links/>
6918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6919             <actions>
6920                 <create permission="CREATE_LOCALE" global_required="true"/>
6921                 <retrieve/>
6922                 <update permission="UPDATE_LOCALE" global_required="true"/>
6923                 <delete permission="DELETE_LOCALE" global_required="true"/>
6924             </actions>
6925         </permacrud>
6926         </class>
6927         <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">
6928                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6929                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6930                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6931                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6932             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6933                 </fields>
6934                 <links>
6935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6936                 </links>
6937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6938             <actions>
6939                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6940                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6941                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6942                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6943             </actions>
6944         </permacrud>
6945         </class>
6946
6947         <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">
6948                 <fields oils_persist:primary="id">
6949                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6950                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6951                 </fields>
6952                 <links/>
6953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6954             <actions>
6955                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6956                 <retrieve/>
6957                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6958                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6959             </actions>
6960         </permacrud>
6961         </class>
6962
6963         <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">
6964                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6965                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6966                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6967                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6968                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6969                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6970                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6971                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6972                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6973                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6974                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6975                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6976                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6977                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6978                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6979                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6980                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6981                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6982                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6983                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6984                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6985                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6986                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6987                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6988                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6989                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6990                 </fields>
6991                 <links>
6992                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6993                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6994                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6995                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6996                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6997                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6998                 </links>
6999         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7000             <actions>
7001                 <create permission="user_request.create">
7002                     <context link="usr" field="home_ou"/>
7003                                 </create>
7004                 <retrieve permission="user_request.view">
7005                     <context link="usr" field="home_ou"/>
7006                                 </retrieve>
7007                 <update permission="user_request.update">
7008                     <context link="usr" field="home_ou"/>
7009                                 </update>
7010                 <delete permission="user_request.delete">
7011                     <context link="usr" field="home_ou"/>
7012                                 </delete>
7013             </actions>
7014         </permacrud>
7015         </class>
7016
7017         <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">
7018                 <fields oils_persist:primary="code">
7019                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7020                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7021                 </fields>
7022                 <links/>
7023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7024             <actions>
7025                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7026                 <retrieve/>
7027                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7028                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7029             </actions>
7030         </permacrud>
7031         </class>
7032
7033         <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">
7034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7035                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7036                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7037                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7038                         <field reporter:label="Ratio" name="ratio" />
7039                 </fields>
7040                 <links>
7041                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7042                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7043                 </links>
7044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7045                         <actions>
7046                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7047                                 <retrieve/>
7048                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7049                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7050                         </actions>
7051                 </permacrud>
7052         </class>
7053
7054         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7055                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7056                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7057                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7058                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7059                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7060                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7061                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7062                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7063                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7064                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7065                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7066                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7067                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7068                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7069                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7070                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7071                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7072                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7073                 </fields>
7074                 <links>
7075                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7076                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7077             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7078             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7079             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7080                 </links>
7081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7082             <actions>
7083                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7084                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7085                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7086                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7087             </actions>
7088         </permacrud>
7089         </class>
7090
7091         <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">
7092                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7093                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7094                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7095                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7096                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7097                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7098                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7099                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7100                 </fields>
7101                 <links>
7102                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7103                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7104                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7105                 </links>
7106         </class>
7107
7108         <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">
7109                 <fields oils_persist:primary="code">
7110                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7111                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7112                 </fields>
7113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7114             <actions>
7115                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7116                 <retrieve/>
7117                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7118                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7119             </actions>
7120                 </permacrud>
7121         </class>
7122
7123         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7125                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7126                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7127                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7128                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7129                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7130                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7131                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7132                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7133                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7134                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7135                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7136                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7137                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7138                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7139                 </fields>
7140                 <links>
7141                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7142                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7143                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7144                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7145                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7146                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7147                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7148                 </links>
7149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7150             <actions>
7151                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7152                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7153                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7154                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7155             </actions>
7156         </permacrud>
7157         </class>
7158
7159         <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">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7161                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7162                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7163                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7164                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7165                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7166                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7167                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7168                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7169                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7170                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7171                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7172                 </fields>
7173                 <links>
7174                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7175                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7176                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7177                 </links>
7178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179             <actions>
7180                 <create   permission="ADMIN_INVOICE">
7181                                         <context link="invoice" field="receiver"/>
7182                                 </create>
7183                 <retrieve permission="ADMIN_INVOICE">
7184                                         <context link="invoice" field="receiver"/>
7185                                 </retrieve>
7186                 <update   permission="ADMIN_INVOICE">
7187                                         <context link="invoice" field="receiver"/>
7188                                 </update>
7189                                 <delete   permission="ADMIN_INVOICE">
7190                                         <context link="invoice" field="receiver"/>
7191                                 </delete>
7192             </actions>
7193         </permacrud>
7194         </class>
7195
7196         <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">
7197                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7198                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7199                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7200                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7201                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7202                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7203                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7204                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7205                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7206                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7207                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7208                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7209                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7210                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7211                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7212                 </fields>
7213                 <links>
7214                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7215                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7216                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7217                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7218                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7219                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7220                 </links>
7221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7222             <actions>
7223                 <create   permission="ADMIN_INVOICE">
7224                                         <context link="invoice" field="receiver"/>
7225                                 </create>
7226                 <retrieve permission="ADMIN_INVOICE">
7227                                         <context link="invoice" field="receiver"/>
7228                                 </retrieve>
7229                 <update   permission="ADMIN_INVOICE">
7230                                         <context link="invoice" field="receiver"/>
7231                                 </update>
7232                                 <delete   permission="ADMIN_INVOICE">
7233                                         <context link="invoice" field="receiver"/>
7234                                 </delete>
7235             </actions>
7236         </permacrud>
7237         </class>
7238
7239         <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">
7240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7241                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7242                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7243                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7244                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7245                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7246                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7247                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7248                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7249                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7250                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7251                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7252                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7253                 </fields>
7254                 <links>
7255                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7256                 </links>
7257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7258             <actions>
7259                 <create permission="ADMIN_PROVIDER">
7260                     <context link="provider" field="owner"/>
7261                 </create>
7262                 <retrieve permission="ADMIN_PROVIDER">
7263                     <context link="provider" field="owner"/>
7264                 </retrieve>
7265                 <update permission="ADMIN_PROVIDER">
7266                     <context link="provider" field="owner"/>
7267                 </update>
7268                 <delete permission="ADMIN_PROVIDER">
7269                     <context link="provider" field="owner"/>
7270                 </delete>
7271             </actions>
7272         </permacrud>
7273         </class>
7274
7275         <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">
7276                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7278                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7279                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7280                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7281                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7282                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7283         </fields>
7284                 <links>
7285                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7286                 </links>
7287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7288             <actions>
7289                 <create permission="ADMIN_PROVIDER">
7290                     <context link="provider" field="owner"/>
7291                 </create>
7292                 <retrieve permission="ADMIN_PROVIDER">
7293                     <context link="provider" field="owner"/>
7294                 </retrieve>
7295                 <update permission="ADMIN_PROVIDER">
7296                     <context link="provider" field="owner"/>
7297                 </update>
7298                 <delete permission="ADMIN_PROVIDER">
7299                     <context link="provider" field="owner"/>
7300                 </delete>
7301             </actions>
7302         </permacrud>
7303     </class>
7304         <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">
7305                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7306                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7307                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7308                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7309                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7310                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7311                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7312                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7313                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7314                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7315                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7316                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7317                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7318                 </fields>
7319                 <links>
7320                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7321                 </links>
7322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7323             <actions>
7324                 <create permission="ADMIN_PROVIDER">
7325                     <context link="contact" jump='provider' field="owner"/>
7326                 </create>
7327                 <retrieve permission="ADMIN_PROVIDER">
7328                     <context link="contact" jump='provider' field="owner"/>
7329                 </retrieve>
7330                 <update permission="ADMIN_PROVIDER">
7331                     <context link="contact" jump='provider' field="owner"/>
7332                 </update>
7333                 <delete permission="ADMIN_PROVIDER">
7334                     <context link="contact" jump='provider' field="owner"/>
7335                 </delete>
7336             </actions>
7337         </permacrud>
7338         </class>
7339
7340         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7341                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7342                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7343                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7344                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7345                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7346                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7347                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7348                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7349                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7350                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7351                 </fields>
7352                 <links>
7353                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7354                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7355                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7356                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7357                 </links>
7358         </class>
7359
7360         <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">
7361                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7362                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7363                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7364                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7365                 </fields>
7366                 <links>
7367             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7368                 </links>
7369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7370                         <actions>
7371                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7372                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7373                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7374                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7375                         </actions>
7376                 </permacrud>
7377         </class>
7378
7379         <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">
7380                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7381                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7382                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7383                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7384                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7385                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7386                 </fields>
7387                 <links>
7388                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7389                 </links>
7390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7391                         <actions>
7392                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7393                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7394                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7395                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7396                         </actions>
7397                 </permacrud>
7398         </class>
7399
7400         <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">
7401                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7402                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7403                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7404                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7405                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7406                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7407                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7408                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7409                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7410                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7411                 </fields>
7412                 <links>
7413                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7414                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7415             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7416             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7417                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7418                 </links>
7419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7420             <actions>
7421                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7422                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7423                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7424                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7425             </actions>
7426         </permacrud>
7427         </class>
7428
7429         <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">
7430                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7431                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7432                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7433                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7434                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7435                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7436                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7437                 </fields>
7438                 <links>
7439                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7440                 </links>
7441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7442                         <actions>
7443                                 <create permission="ADMIN_FUNDING_SOURCE">
7444                     <context link="funding_source" field="owner"/>
7445                 </create>
7446                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7447                     <context link="funding_source" field="owner"/>
7448                 </retrieve>
7449                                 <update permission="ADMIN_FUNDING_SOURCE">
7450                     <context link="funding_source" field="owner"/>
7451                 </update>
7452                                 <delete permission="ADMIN_FUNDING_SOURCE">
7453                     <context link="funding_source" field="owner"/>
7454                 </delete>
7455                         </actions>
7456                 </permacrud>
7457         </class>
7458
7459         <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">
7460                 <fields oils_persist:primary="id">
7461                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7462                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7463                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7464                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7465                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7466                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7467                 </fields>
7468                 <links>
7469                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7470                 </links>
7471         </class>
7472
7473         <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">
7474                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7475                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7476                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7477                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7478                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7479                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7480                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7481                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7482                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7483                 </fields>
7484                 <links>
7485                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7486                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7487                 </links>
7488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7489                         <actions>
7490                                 <create permission="ADMIN_ACQ_FUND">
7491                     <context link="fund" field="org"/>
7492                 </create>
7493                                 <retrieve permission="ADMIN_ACQ_FUND">
7494                     <context link="fund" field="org"/>
7495                 </retrieve>
7496                                 <update permission="ADMIN_ACQ_FUND">
7497                     <context link="fund" field="org"/>
7498                 </update>
7499                                 <delete permission="ADMIN_ACQ_FUND">
7500                     <context link="fund" field="org"/>
7501                 </delete>
7502                         </actions>
7503                 </permacrud>
7504         </class>
7505
7506         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7508                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7509                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7510                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7511                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7512                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7513                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7514                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7515                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7516                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7517                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7518                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7519                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7520                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7521                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7522                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7523                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7524                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7525                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7526                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7527                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7528                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7529                 </fields>
7530                 <links>
7531                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7532                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7533             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7534             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7535             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7536             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7537             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7538             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7539             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7540             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7541             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7542                 </links>
7543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7544             <actions>
7545                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7546                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7547                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7548                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7549             </actions>
7550         </permacrud>
7551         </class>
7552
7553         <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">
7554                 <fields oils_persist:primary="fund">
7555                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7556                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7557                 </fields>
7558                 <links>
7559                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7560                 </links>
7561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7562             <actions>
7563                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7564                                         <context link="fund" field="org" />
7565                 </retrieve>
7566             </actions>
7567         </permacrud>
7568         </class>
7569
7570         <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">
7571                 <fields oils_persist:primary="fund">
7572                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7573                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7574                 </fields>
7575                 <links>
7576                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7577                 </links>
7578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579             <actions>
7580                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7581                                         <context link="fund" field="org" />
7582                 </retrieve>
7583             </actions>
7584         </permacrud>
7585         </class>
7586
7587         <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">
7588                 <fields oils_persist:primary="fund">
7589                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7590                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7591                 </fields>
7592                 <links>
7593                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7594                 </links>
7595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7596             <actions>
7597                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7598                                         <context link="fund" field="org" />
7599                 </retrieve>
7600             </actions>
7601         </permacrud>
7602         </class>
7603
7604         <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">
7605                 <fields oils_persist:primary="fund">
7606                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7607                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7608                 </fields>
7609                 <links>
7610                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7611                 </links>
7612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7613             <actions>
7614                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7615                                         <context link="fund" field="org" />
7616                 </retrieve>
7617             </actions>
7618         </permacrud>
7619         </class>
7620
7621         <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">
7622                 <fields oils_persist:primary="fund">
7623                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7624                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7625                 </fields>
7626                 <links>
7627                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7628                 </links>
7629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7630             <actions>
7631                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7632                                         <context link="fund" field="org" />
7633                 </retrieve>
7634             </actions>
7635         </permacrud>
7636         </class>
7637
7638    <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">
7639         <fields oils_persist:primary="fund">
7640             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7641             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7642         </fields>
7643         <links>
7644             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7645         </links>
7646     </class>
7647
7648    <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">
7649         <fields oils_persist:primary="fund">
7650             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7651             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7652         </fields>
7653         <links>
7654             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7655         </links>
7656     </class>
7657
7658    <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">
7659         <fields oils_persist:primary="fund">
7660             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7661             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7662         </fields>
7663         <links>
7664             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7665         </links>
7666     </class>
7667
7668    <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">
7669         <fields oils_persist:primary="fund">
7670             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7671             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7672         </fields>
7673         <links>
7674             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7675         </links>
7676     </class>
7677
7678    <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">
7679         <fields oils_persist:primary="fund">
7680             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7681             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7682         </fields>
7683         <links>
7684             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7685         </links>
7686     </class>
7687
7688         <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">
7689                 <fields oils_persist:primary="funding_source">
7690                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7691                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7692                 </fields>
7693                 <links>
7694                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7695                 </links>
7696         </class>
7697
7698         <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">
7699                 <fields oils_persist:primary="funding_source">
7700                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7701                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7702                 </fields>
7703                 <links>
7704                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7705                 </links>
7706         </class>
7707
7708         <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">
7709                 <fields oils_persist:primary="funding_source">
7710                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7711                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7712                 </fields>
7713                 <links>
7714                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7715                 </links>
7716         </class>
7717
7718         <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">
7719                 <fields oils_persist:primary="fund">
7720                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7721                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7722                 </fields>
7723                 <links>
7724                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7725                 </links>
7726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7727             <actions>
7728                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7729                                         <context link="fund" field="org" />
7730                 </retrieve>
7731             </actions>
7732         </permacrud>
7733     </class>
7734     <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">
7735         <oils_persist:source_definition><![CDATA[
7736             SELECT
7737                 acqf.*,
7738                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7739                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7740                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7741                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7742             FROM
7743                 acq.fund acqf
7744                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7745                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7746                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7747                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7748         ]]></oils_persist:source_definition>
7749         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7750             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7751             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7752             <field reporter:label="Name" name="name" reporter:datatype="text" />
7753             <field reporter:label="Year" name="year" reporter:datatype="int" />
7754             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7755             <field reporter:label="Code" name="code" reporter:datatype="text" />
7756             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7757             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7758             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7759             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7760             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7761
7762             <!-- non fund-native fields -->
7763             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7764             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7765             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7766             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7767         </fields>
7768         <links>
7769             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7770             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7771             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7772         </links>
7773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7774             <actions>
7775                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7776             </actions>
7777         </permacrud>
7778         </class>
7779         <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">
7780                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7781                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7782                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7783                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7784                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7785                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7786                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7787                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7788                 </fields>
7789                 <links>
7790                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7791                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7792                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7793                 </links>
7794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7795                         <actions>
7796                                 <create permission="ADMIN_ACQ_FUND">
7797                     <context link="fund" field="org"/>
7798                 </create>
7799                                 <retrieve permission="ADMIN_ACQ_FUND">
7800                     <context link="fund" field="org"/>
7801                 </retrieve>
7802                                 <update permission="ADMIN_ACQ_FUND">
7803                     <context link="fund" field="org"/>
7804                 </update>
7805                                 <delete permission="ADMIN_ACQ_FUND">
7806                     <context link="fund" field="org"/>
7807                 </delete>
7808                         </actions>
7809                 </permacrud>
7810         </class>
7811
7812     <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">
7813         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7814             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7815             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7816             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7817             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7818             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7819             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7820             <field reporter:label="Note" name="note" reporter:datatype="text" />
7821             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7822         </fields>
7823         <links>
7824             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7825             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7826             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7827         </links>
7828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7829                         <actions>
7830                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7831                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7832                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7833                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7834                         </actions>
7835                 </permacrud>
7836     </class>
7837
7838         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7839                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7840                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7841                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7842                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7843                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7844                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7845                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7846                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7847                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7848                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7849                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7850                 </fields>
7851                 <links>
7852                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7853                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7854                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7855                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7856                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7857                 </links>
7858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7859                         <actions>
7860                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7861                         </actions>
7862                 </permacrud>
7863         </class>
7864
7865         <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">
7866                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7867                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7868                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7869                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7870                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7871                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7872                 </fields>
7873                 <links>
7874                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7875                 </links>
7876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7877                         <actions>
7878                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7879                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7880                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7881                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7882                         </actions>
7883                 </permacrud>
7884         </class>
7885
7886         <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">
7887                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7888                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7889                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7890                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7891                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7892                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7893                         <field reporter:label="State" name="state" reporter:datatype="text" />
7894                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7895                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7896                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7897                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7898                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7899                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7900                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7901                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7902                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7903                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7904                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7905                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7906                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7907                 </fields>
7908                 <links>
7909                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7910                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7911                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7912                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7913                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7914                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7915                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7916                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7917                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7918                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7919                 </links>
7920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7921                         <actions>
7922                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7923                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7924                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7925                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7926                         </actions>
7927                 </permacrud>
7928         </class>
7929
7930         <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">
7931                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7932                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7933                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7934                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7935                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7936                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7937                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7938                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7939                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7940                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7941                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7942                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7943                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7944                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7945                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7946                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7947                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7948                 </fields>
7949                 <links>
7950                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7951                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7952                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7953                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7954                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7955                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7956                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7957                 </links>
7958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7959             <actions>
7960                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7961             </actions>
7962                 </permacrud>
7963         </class>
7964
7965         <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">
7966                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7967                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7968                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7969                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7970                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7971                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7972                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7973                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7974                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7975                 </fields>
7976                 <links>
7977                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7978                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7979                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982             <actions>
7983                 <create permission="CREATE_PURCHASE_ORDER">
7984                     <context link="purchase_order" field="ordering_agency"/>
7985                 </create>
7986                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7987                     <context link="purchase_order" field="ordering_agency"/>
7988                 </retrieve>
7989                 <update permission="CREATE_PURCHASE_ORDER">
7990                     <context link="purchase_order" field="ordering_agency"/>
7991                 </update>
7992                 <delete permission="CREATE_PURCHASE_ORDER">
7993                     <context link="purchase_order" field="ordering_agency"/>
7994                 </delete>
7995             </actions>
7996                 </permacrud>
7997         </class>
7998
7999         <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">
8000                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8001                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8002                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8003                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8004                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8005                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8006                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8007                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8008                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8009                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8010                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8011                 </fields>
8012                 <links>
8013                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8014                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8015                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8016                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8017                 </links>
8018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019             <actions>
8020                 <create permission="CREATE_PURCHASE_ORDER">
8021                     <context link="purchase_order" field="ordering_agency"/>
8022                 </create>
8023                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8024                     <context link="purchase_order" field="ordering_agency"/>
8025                 </retrieve>
8026                 <update permission="CREATE_PURCHASE_ORDER">
8027                     <context link="purchase_order" field="ordering_agency"/>
8028                 </update>
8029                 <delete permission="CREATE_PURCHASE_ORDER">
8030                     <context link="purchase_order" field="ordering_agency"/>
8031                 </delete>
8032             </actions>
8033                 </permacrud>
8034         </class>
8035
8036         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8038                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8039                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8040                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8041                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8042                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8043                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8044                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8045                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8046                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8047                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8048                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8049                         <field reporter:label="State" name="state" reporter:datatype="text" />
8050                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8051                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8052                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8053                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8054                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8055                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8056                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8057                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8058                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8059                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8060                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8061                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8062                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8063                 </fields>
8064                 <links>
8065                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8066                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8067                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8068                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8069                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8070                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8071                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8072                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8073                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8074                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8075                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8076                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8077                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8078                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8079                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8080                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8081                 </links>
8082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8083                         <actions>
8084                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8085                                         <context link="purchase_order" field="ordering_agency"/>
8086                                         <context link="picklist" field="org_unit"/>
8087                                 </retrieve>
8088                         </actions>
8089                 </permacrud>
8090         </class>
8091
8092         <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">
8093                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8094                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8095                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8096                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8097                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8098                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8099                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8100                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8101                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8102                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8103                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8104                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8105                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8106                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8107                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8108                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8109                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8110                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8111                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8112                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8113                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8114                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8115                 </fields>
8116                 <links>
8117                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8118                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8119                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8120                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8121                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8122                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8123                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8124                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8125                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8126                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8127                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8128                 </links>
8129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8130                         <actions>
8131                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8132                                         <context link="purchase_order" field="ordering_agency"/>
8133                                         <context link="picklist" field="org_unit"/>
8134                                 </retrieve>
8135                         </actions>
8136                 </permacrud>
8137         </class>
8138
8139         <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">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8141                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8142                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8143                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8144                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8145                 </fields>
8146                 <links>
8147                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8148                 </links>
8149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8150                         <actions>
8151                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8152                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8153                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8154                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8155                         </actions>
8156                 </permacrud>
8157         </class>
8158
8159         <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">
8160                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8161                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8162                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8163                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8164                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8165                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8166                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8167                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8168                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8169                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8170                 </fields>
8171                 <links>
8172                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8173                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8174                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8175                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8176                 </links>
8177         </class>
8178
8179         <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">
8180                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8181                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8182                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8183                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8184                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8185                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8186                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8187                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8188                 </fields>
8189                 <links>
8190                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8191                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8192                 </links>
8193         </class>
8194
8195         <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">
8196                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8197                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8198                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8199                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8200                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8201                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8202                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8203                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8204                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8205                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8206                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8207                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8208                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8209                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8210                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8211                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8212                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8213                 </fields>
8214                 <links>
8215                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8216                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8217                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8218                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8219                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8220                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8221                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8222                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8223                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8224                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8225                 </links>
8226         </class>
8227
8228         <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">
8229                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8230                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8231                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8232                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8233                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8234                 </fields>
8235                 <links/>
8236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8237                         <actions>
8238                                 <retrieve />
8239                         </actions>
8240                 </permacrud>
8241         </class>
8242
8243         <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">
8244                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8245                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8246                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8247                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8248                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8249                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8250             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8251                 </fields>
8252                 <links/>
8253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8254             <actions>
8255                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8256                 <retrieve />
8257                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8258                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8259             </actions>
8260         </permacrud>
8261         </class>
8262
8263         <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">
8264                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8265                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8266                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8267                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8268                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8269                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8270                 </fields>
8271                 <links/>
8272         </class>
8273         <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">
8274                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8275                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8276                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8277                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8278                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8279                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8280                 </fields>
8281                 <links>
8282                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8283                 </links>
8284         </class>
8285
8286         <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">
8287             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8288                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8289                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8290                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8291                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8292                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8293                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8294         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8295
8296             </fields>
8297             <links>
8298                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8299             </links>
8300             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8301                 <actions>
8302                     <create permission="ADMIN_PROVIDER">
8303                         <context link="provider" field="owner"/>
8304                     </create>
8305                     <retrieve permission="ADMIN_PROVIDER">
8306                         <context link="provider" field="owner"/>
8307                     </retrieve>
8308                     <update permission="ADMIN_PROVIDER">
8309                         <context link="provider" field="owner"/>
8310                     </update>
8311                     <delete permission="ADMIN_PROVIDER">
8312                         <context link="provider" field="owner"/>
8313                     </delete>
8314                 </actions>
8315             </permacrud>
8316         </class>
8317         
8318         <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">
8319             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8320                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8321                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8322                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8323                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8324             </fields>
8325             <links>
8326                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8327             </links>
8328             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8329                 <actions>
8330                     <create permission="ADMIN_PROVIDER">
8331                         <context link="provider" field="owner"/>
8332                     </create>
8333                     <retrieve permission="ADMIN_PROVIDER">
8334                         <context link="provider" field="owner"/>
8335                     </retrieve>
8336                     <update permission="ADMIN_PROVIDER">
8337                         <context link="provider" field="owner"/>
8338                     </update>
8339                     <delete permission="ADMIN_PROVIDER">
8340                         <context link="provider" field="owner"/>
8341                     </delete>
8342                 </actions>
8343             </permacrud>
8344         </class>
8345         
8346         <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">
8347             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8348                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8349                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8350                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8351                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8352                 </fields>
8353                 <links/>
8354         </class>
8355
8356         <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">
8357                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8358                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8359                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8360                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8361                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8362                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8363                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8364                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8365                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8366                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8367                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8368                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8369                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8370                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8371                 </fields>
8372                 <links>
8373                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8375                 </links>
8376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8377             <actions>
8378                 <create permission="ADMIN_PROVIDER">
8379                     <context link="provider" field="owner"/>
8380                 </create>
8381                 <retrieve permission="ADMIN_PROVIDER">
8382                     <context link="provider" field="owner"/>
8383                 </retrieve>
8384                 <update permission="ADMIN_PROVIDER">
8385                     <context link="provider" field="owner"/>
8386                 </update>
8387                 <delete permission="ADMIN_PROVIDER">
8388                     <context link="provider" field="owner"/>
8389                 </delete>
8390             </actions>
8391         </permacrud>
8392         </class>
8393
8394         <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">
8395                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8396                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8397                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8398                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8399                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8400                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8401                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8402                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8403                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8404                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8405                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8406                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8407                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8408                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8409                 </fields>
8410                 <links>
8411                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8412                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8413                 </links>
8414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8415             <actions>
8416                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8417                     <context link="account" jump="provider" field="owner"/>
8418                 </retrieve>
8419                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8420                     <context link="account" jump="provider" field="owner"/>
8421                 </update>
8422                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8423                     <context link="account" jump="provider" field="owner"/>
8424                 </delete>
8425             </actions>
8426         </permacrud>
8427         </class>
8428
8429
8430         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8431                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8432                         <field name="id" reporter:datatype="id" />
8433                         <field name="parent" reporter:datatype="link"/>
8434                         <field name="owner" reporter:datatype="link"/>
8435                         <field name="create_time" reporter:datatype="timestamp"/>
8436                         <field name="name" reporter:datatype="text"/>
8437                         <field name="shared" reporter:datatype="bool"/>
8438                         <field name="share_with" reporter:datatype="link"/>
8439                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8440                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8441                 </fields>
8442                 <links>
8443                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8444                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8445                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8446                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8447                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8448                 </links>
8449         </class>
8450         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8451                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8452                         <field name="id" reporter:datatype="id" />
8453                         <field name="parent" reporter:datatype="link"/>
8454                         <field name="owner" reporter:datatype="link"/>
8455                         <field name="create_time" reporter:datatype="timestamp"/>
8456                         <field name="name" reporter:datatype="text"/>
8457                         <field name="shared" reporter:datatype="bool"/>
8458                         <field name="share_with" reporter:datatype="link"/>
8459                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8460                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8461                 </fields>
8462                 <links>
8463                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8464                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8465                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8466                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8467                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8468                 </links>
8469         </class>
8470         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8471                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8472                         <field name="id" reporter:datatype="id" />
8473                         <field name="parent" reporter:datatype="link"/>
8474                         <field name="owner" reporter:datatype="link"/>
8475                         <field name="create_time" reporter:datatype="timestamp"/>
8476                         <field name="name" reporter:datatype="text"/>
8477                         <field name="shared" reporter:datatype="bool"/>
8478                         <field name="share_with" reporter:datatype="link"/>
8479                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8480                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8481                 </fields>
8482                 <links>
8483                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8484                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8485                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8486                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8487                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8488                 </links>
8489         </class>
8490         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8491                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8492                         <field name="id" reporter:datatype="id" />
8493                         <field name="owner" reporter:datatype="link"/>
8494                         <field name="create_time" reporter:datatype="timestamp"/>
8495                         <field name="name" reporter:datatype="text"/>
8496                         <field name="data" reporter:datatype="text"/>
8497                         <field name="folder" reporter:datatype="link"/>
8498                         <field name="description" reporter:datatype="text"/>
8499                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8500                 </fields>
8501                 <links>
8502                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8503                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8504                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8505                 </links>
8506         </class>
8507         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8508                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8509                         <field name="id" reporter:datatype="id" />
8510                         <field name="owner" reporter:datatype="link"/>
8511                         <field name="create_time" reporter:datatype="timestamp"/>
8512                         <field name="template" reporter:datatype="link"/>
8513                         <field name="data" reporter:datatype="text"/>
8514                         <field name="folder" reporter:datatype="link"/>
8515                         <field name="recur" reporter:datatype="bool"/>
8516                         <field name="recurrence" reporter:datatype="interval"/>
8517                         <field name="name" reporter:datatype="text"/>
8518                         <field name="description" reporter:datatype="text"/>
8519                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8520                 </fields>
8521                 <links>
8522                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8523                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8524                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8525                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8526                 </links>
8527         </class>
8528         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8529                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8530                         <field name="id" reporter:datatype="id" />
8531                         <field name="runner" reporter:datatype="link"/>
8532                         <field name="start_time" reporter:datatype="timestamp"/>
8533                         <field name="complete_time" reporter:datatype="timestamp"/>
8534                         <field name="run_time" reporter:datatype="timestamp"/>
8535                         <field name="email" reporter:datatype="text"/>
8536                         <field name="excel_format" reporter:datatype="bool"/>
8537                         <field name="csv_format" reporter:datatype="bool"/>
8538                         <field name="html_format" reporter:datatype="bool"/>
8539                         <field name="error_code" reporter:datatype="int"/>
8540                         <field name="error_text" reporter:datatype="text"/>
8541                         <field name="report" reporter:datatype="link"/>
8542                         <field name="folder" reporter:datatype="link"/>
8543                         <field name="chart_pie" reporter:datatype="bool"/>
8544                         <field name="chart_bar" reporter:datatype="bool"/>
8545                         <field name="chart_line" reporter:datatype="bool"/>
8546                 </fields>
8547                 <links>
8548                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8549                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8550                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8551                 </links>
8552         </class>
8553         <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">
8554                 <fields oils_persist:primary="id">
8555                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8556                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8557                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8558                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8559                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8560                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8561                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8562                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8563                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8564                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8565                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8566                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8567                 </fields>
8568                 <links>
8569                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8570                 </links>
8571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8572                         <actions>
8573                                 <retrieve />
8574                         </actions>
8575                 </permacrud>
8576         </class>
8577         <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">
8578                 <fields oils_persist:primary="id">
8579                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8580                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8581                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8582                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8583                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8584                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8585                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8586                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8587                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8588                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8589                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8590                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8591                 </fields>
8592                 <links>
8593                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8594                 </links>
8595         </class>
8596         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8597                 <fields oils_persist:primary="id">
8598                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8599                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8600                         <field reporter:label="Fingerprint" name="fingerprint" />
8601                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8602                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8603                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8604                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8605                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8606                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8607                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8608                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8609                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8610                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8611                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8612                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8613                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8614                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8615                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8616                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8617                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8618                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8619                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8620                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8621                 </fields>
8622                 <links>
8623                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8624                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8625                 </links>
8626         </class>
8627         <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">
8628                 <fields oils_persist:primary="id">
8629                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8630                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8631                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8632                 </fields>
8633                 <links>
8634                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8635                 </links>
8636         </class>
8637         <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">
8638                 <fields oils_persist:primary="id">
8639                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8640                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8641                 </fields>
8642                 <links>
8643                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8644                 </links>
8645         </class>
8646         <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">
8647                 <fields oils_persist:primary="id">
8648                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8649                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8650                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8651                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8652                 </fields>
8653                 <links>
8654                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8655                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8656                 </links>
8657         </class>
8658         <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">
8659                 <fields oils_persist:primary="xact">
8660                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8661                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8662                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8663                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8664                 </fields>
8665                 <links>
8666                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8667                 </links>
8668         </class>
8669         <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">
8670                 <fields oils_persist:primary="xact">
8671                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8672                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8673                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8674                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8675                 </fields>
8676                 <links>
8677                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8678                 </links>
8679         </class>
8680         <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)">
8681                 <fields oils_persist:primary="id">
8682                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8683                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8684                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8685                 </fields>
8686                 <links>
8687                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8688                 </links>
8689         </class>
8690         <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">
8691                 <fields oils_persist:primary="id">
8692                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8693                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8694                 </fields>
8695                 <links>
8696                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8697                 </links>
8698         </class>
8699         <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">
8700                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8701                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8702                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8703                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8704                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8705                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8706                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8707                 </fields>
8708                 <links>
8709                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8710                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8711                 </links>
8712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8713                         <actions>
8714                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8715                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8716                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8717                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8718                         </actions>
8719                 </permacrud>
8720         </class>
8721         <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">
8722                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8723                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8724                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8725                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8726                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8727                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8728                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8729                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8730                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8731                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8732                 </fields>
8733                 <links>
8734                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8735                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8736                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8737                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8738                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8739                 </links>
8740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8741                         <actions>
8742                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8743                                         <context link="formula" field="owner"/>
8744                                 </create>
8745                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8746                                         <context link="formula" field="owner"/>
8747                                 </retrieve>
8748                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8749                                         <context link="formula" field="owner"/>
8750                                 </update>
8751                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8752                                         <context link="formula" field="owner"/>
8753                                 </delete>
8754                         </actions>
8755                 </permacrud>
8756         </class>
8757
8758         <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">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8760                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8761                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8762                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8763                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8764                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8765                 </fields>
8766                 <links>
8767                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8768                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8769                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8770                 </links>
8771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8772                         <actions>
8773                                 <create permission="CREATE_PURCHASE_ORDER">
8774                                         <context link="formula" field="owner"/>
8775                 </create>
8776                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8777                                         <context link="formula" field="owner"/>
8778                 </retrieve>
8779                                 <update permission="CREATE_PURCHASE_ORDER">
8780                                         <context link="formula" field="owner"/>
8781                 </update>
8782                                 <delete permission="CREATE_PURCHASE_ORDER">
8783                                         <context link="formula" field="owner"/>
8784                 </delete>
8785                         </actions>
8786                 </permacrud>
8787         </class>
8788
8789         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8790                 <fields oils_persist:primary="id">
8791                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8792                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8793                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8794                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8795                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8796                 </fields>
8797                 <links>
8798                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8799                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8800                 </links>
8801         </class>
8802
8803         <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">
8804                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8805                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8806                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8807                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8808                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8809                 </fields>
8810                 <links>
8811                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8812                 </links>
8813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8814                         <actions>
8815                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8816                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8817                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8818                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8819                         </actions>
8820                 </permacrud>
8821         </class>
8822
8823         <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">
8824                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8825                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8826                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8827                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8828                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8829                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8830                 </fields>
8831                 <links>
8832                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8833                 </links>
8834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8835                         <actions>
8836                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8837                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8838                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8839                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8840                         </actions>
8841                 </permacrud>
8842         </class>
8843
8844         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8845                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8846                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8847                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8848                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8849                 </fields>
8850                 <links>
8851                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8852                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8853                 </links>
8854         </class>
8855
8856         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8857                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8858                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8859                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8860                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8861                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8862                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8863                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8864                 </fields>
8865                 <links>
8866                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8867                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8868                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8869                 </links>
8870         </class>
8871
8872         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8873                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8874                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8875                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8876                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8877                 </fields>
8878                 <links>
8879                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8880                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8881                 </links>
8882         </class>
8883
8884         <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">
8885                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8886                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8887                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8888                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8889                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8890                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8891                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8892                 </fields>
8893                 <links>
8894                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8895                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8896                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8897                 </links>
8898         </class>
8899
8900         <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">
8901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8902                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8903                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8904                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8905                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8906                 </fields>
8907                 <links>
8908                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8909                 </links>
8910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8911             <actions>
8912                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8913                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8914                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8915                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8916             </actions>
8917                 </permacrud>
8918         </class>
8919
8920         <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">
8921                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8922                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8923                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8924                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8925                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8926                 </fields>
8927                 <links>
8928                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8929                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8930                 </links>
8931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8932                         <actions>
8933                                 <create permission="ADMIN_CLAIM_POLICY">
8934                                         <context link="claim_policy" field="org_unit"/>
8935                 </create>
8936                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8937                                         <context link="claim_policy" field="org_unit"/>
8938                 </retrieve>
8939                                 <update permission="ADMIN_CLAIM_POLICY">
8940                                         <context link="claim_policy" field="org_unit"/>
8941                 </update>
8942                                 <delete permission="ADMIN_CLAIM_POLICY">
8943                                         <context link="claim_policy" field="org_unit"/>
8944                 </delete>
8945                         </actions>
8946                 </permacrud>
8947         </class>
8948
8949     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8950         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
8951             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8952             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
8953             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8954             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8955             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8956             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8957             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8958             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8959             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8960             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8961             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8962             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8963             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8964             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8965             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8966             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
8967         </fields>
8968         <links>
8969             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
8970         </links>
8971     </class>
8972
8973     <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">
8974         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8975             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8976             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8977             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8978             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8979             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8980         </fields>
8981     </class>
8982
8983     <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">
8984         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8985             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8986             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8987             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8988             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8989             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8990             <field reporter:label="City" name="city" reporter:datatype="text"/>
8991             <field reporter:label="County" name="county"  reporter:datatype="text"/>
8992             <field reporter:label="State" name="state" reporter:datatype="text"/>
8993             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8994             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8995             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8996         </fields>
8997     </class>
8998
8999     <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">
9000         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9001             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9002             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9003             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9004             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9005             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9006             <field reporter:label="City" name="city" reporter:datatype="text"/>
9007             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9008             <field reporter:label="State" name="state" reporter:datatype="text"/>
9009             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9010             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9011             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9012         </fields>
9013     </class>
9014
9015     <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">
9016         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9017             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9018             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9019             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9020             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9021             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9022             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9023         </fields>
9024     </class>
9025
9026         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9027                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9028                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9029                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9030                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9031                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9032                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9033                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9034                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9035                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9036                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9037                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9038                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9039                 </fields>
9040                 <links>
9041                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9042                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9043                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9044                 </links>
9045         </class>
9046
9047         <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">
9048                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9049                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9050                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9051                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9052                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9053                 </fields>
9054                 <links>
9055                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9056                 </links>
9057         </class>
9058
9059     <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">
9060         <fields>
9061             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9062             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9063             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9064         </fields>
9065                 <links>
9066                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9067                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9068                 </links>
9069     </class>
9070
9071     <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">
9072         <fields>
9073             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9074             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9075         </fields>
9076                 <links>
9077                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9078                 </links>
9079     </class>
9080
9081     <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">
9082         <fields>
9083             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9084             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9085             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9086         </fields>
9087                 <links>
9088                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9089                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9090                 </links>
9091     </class>
9092
9093     <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">
9094         <fields>
9095             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9096             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9097         </fields>
9098                 <links>
9099                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9100                 </links>
9101     </class>
9102
9103     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9104                 <oils_persist:source_definition>
9105
9106             SELECT  DISTINCT l.*
9107               FROM  action.unfulfilled_hold_loops l
9108                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9109               WHERE l.count = m.max
9110
9111                 </oils_persist:source_definition>
9112         <fields>
9113             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9114             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9115             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9116         </fields>
9117                 <links>
9118                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9119                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9120                 </links>
9121     </class>
9122
9123         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9124                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9125                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9126                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9127                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9128                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9129                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9130                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9131                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9132                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9133                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9134                 </fields>
9135                 <links>
9136                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9137                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9138                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9139                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9140                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9141                 </links>
9142         </class>
9143
9144         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9145                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9146                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9147                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9148                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9149                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9150                 </fields>
9151                 <links>
9152                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9153                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9154                 </links>
9155         </class>
9156
9157         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9158                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9159                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9160                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9161                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9162                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9163                 </fields>
9164                 <links>
9165                 </links>
9166         </class>
9167
9168         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9169                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9170                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9171                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9172                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9173                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9174                 </fields>
9175                 <links>
9176                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9177                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9178                 </links>
9179         </class>
9180         
9181         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9182                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9183                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9184                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9185                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9186                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9187                 </fields>
9188                 <links>
9189                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9190                 </links>
9191         </class>
9192         
9193         <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">
9194                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9195                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9196                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9197                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9198                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9199                 </fields>
9200                 <links>
9201                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9202                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9203                 </links>
9204         </class>
9205
9206         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9207                 <fields oils_persist:primary="name">
9208                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9209                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9210                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9211                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9212                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9213                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9214                 </fields>
9215                 <links>
9216                 </links>
9217         </class>
9218
9219         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9220                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9221                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9222                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9223                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9224                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9225                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9226                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9227                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9228                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9229                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9230                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9231                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9232                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9233                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9234                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9235                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9236                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9237                 </fields>
9238                 <links>
9239                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9240                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9241                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9242                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9243                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9244                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9245                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9246                 </links>
9247         </class>
9248
9249         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9250                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9251                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9252                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9253                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9254                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9255                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9256                 </fields>
9257                 <links>
9258                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9259                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9260                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9261                 </links>
9262         </class>
9263
9264         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9265                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9266                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9267                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9268                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9269                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9270                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9271                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9272                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9273                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9274                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9275                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9276                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9277                 </fields>
9278                 <links>
9279                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9280                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9281                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9282                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9283                 </links>
9284         </class>
9285
9286         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9287                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9288                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9289                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9290                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9291                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9292                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9293                 </fields>
9294                 <links>
9295                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9296                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9297                 </links>
9298         </class>
9299
9300         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9301                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9302                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9303                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9304                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9305                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9306                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9307                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9308                 </fields>
9309                 <links>
9310                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9311                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9312                 </links>
9313         </class>
9314
9315         <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">
9316                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9317                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9318                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9319                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9320                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9321                 </fields>
9322                 <links>
9323                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9324                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9325                 </links>
9326         </class>
9327
9328         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9329                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9330                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9331                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9332                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9333                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9334                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9335                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9336                 </fields>
9337                 <links>
9338                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9339                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9340                 </links>
9341         </class>
9342
9343         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9344                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9345                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9346                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9347                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9348                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9349                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9350                 </fields>
9351                 <links>
9352                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9353                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9354                 </links>
9355         </class>
9356
9357         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9358                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9359                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9360                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9361                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9362                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9363                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9364                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9365                 </fields>
9366                 <links>
9367                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9368                 </links>
9369         </class>
9370
9371         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9372                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9373                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9374                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9375                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9376                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9377                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9378                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9379                 </fields>
9380                 <links>
9381                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9382                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9383                 </links>
9384         </class>
9385
9386         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9387                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9388                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9389                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9390                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9391                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9392                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9393                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9394                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9395                 </fields>
9396                 <links>
9397                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9398                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9399                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9400                 </links>
9401         </class>
9402
9403         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9404                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9405                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9406                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9407                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9408                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9409                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9410                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9411                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9412                 </fields>
9413                 <links>
9414                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9415                 </links>
9416         </class>
9417
9418         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9419                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9420                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9421                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9422                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9423                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9424                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9425                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9426                 </fields>
9427                 <links>
9428                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9429                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9430                 </links>
9431         </class>
9432
9433         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9434                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9435                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9436                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9437                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9438                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9439                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9440                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9441                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9442                 </fields>
9443                 <links>
9444                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9445                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9446                 </links>
9447         </class>
9448
9449         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9450                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9451                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9452                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9453                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9454                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9455                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9456                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9457                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9458                 </fields>
9459                 <links>
9460                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9461                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9462                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9463                 </links>
9464         </class>
9465
9466         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9467                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9468                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9469                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9470                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9471                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9472                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9473                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9474                 </fields>
9475                 <links>
9476                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9477                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9478                 </links>
9479         </class>
9480
9481         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9482                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9483                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9484                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9485                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9486                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9487                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9488                 </fields>
9489                 <links>
9490                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9491                 </links>
9492         </class>
9493
9494         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9495                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9496                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9497                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9498                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9499                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9500                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9501                 </fields>
9502                 <links>
9503                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9504                 </links>
9505         </class>
9506
9507         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9508                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9509                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9510                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9511                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9513                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9514                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9515                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9516                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9517                 </fields>
9518                 <links>
9519                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9520                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9521                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9522                 </links>
9523         </class>
9524
9525         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9526                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9527                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9528                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9529                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9530                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9531                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9532                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9533                 </fields>
9534                 <links>
9535                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9536                 </links>
9537         </class>
9538
9539         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9540                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9541                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9542                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9543                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9544                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9545                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9546                 </fields>
9547                 <links>
9548                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9549                 </links>
9550         </class>
9551
9552         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9553                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9554                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9555                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9556                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9557                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9558                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9559                 </fields>
9560                 <links>
9561                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9562                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9563                 </links>
9564         </class>
9565
9566         <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">
9567                 <fields oils_persist:primary="id">
9568                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9569                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9570                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9571                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9572                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9573                 </fields>
9574                 <links>
9575                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9576                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9577                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9578                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9579                 </links>
9580         </class>
9581
9582         <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">
9583                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9584                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9585                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9586                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9587                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9588                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9589                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9590                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9591                 </fields>
9592                 <links/>
9593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9594                         <actions>
9595                                 <retrieve/>
9596                         </actions>
9597                 </permacrud>
9598         </class>
9599
9600         <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">
9601                 <fields oils_persist:primary="ptype_key">
9602                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9603                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9604                 </fields>
9605                 <links/>
9606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9607                         <actions>
9608                                 <retrieve/>
9609                         </actions>
9610                 </permacrud>
9611         </class>
9612
9613         <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">
9614                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9615                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9616                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9617                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9618                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9619                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9620                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9621                 </fields>
9622                 <links>
9623                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9624                 </links>
9625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9626                         <actions>
9627                                 <retrieve/>
9628                         </actions>
9629                 </permacrud>
9630         </class>
9631
9632         <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">
9633                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9634                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9635                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9636                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9637                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9638                 </fields>
9639                 <links>
9640                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9641                 </links>
9642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9643                         <actions>
9644                                 <retrieve/>
9645                         </actions>
9646                 </permacrud>
9647         </class>
9648
9649     <class
9650         id="uvs"
9651         controller="open-ils.cstore open-ils.pcrud"
9652         oils_obj:fieldmapper="url_verify::session"
9653         oils_persist:tablename="url_verify.session"
9654         reporter:label="URL Verification Session"
9655     >
9656         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9657             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9658             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9659                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9660             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9661             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9662             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9663             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9664             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9665             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9666         </fields>
9667
9668         <links>
9669             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9670             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9671             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9672             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9673             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9674         </links>
9675
9676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9677             <actions>
9678                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9679             </actions>
9680         </permacrud>
9681
9682     </class>
9683
9684     <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">
9685         <oils_persist:source_definition>
9686             SELECT
9687                 cbrebi.id AS id,  -- so we can have a pkey in our view
9688                 uvs.id AS session,
9689                 uvs.owning_lib,
9690                 cbrebi.target_biblio_record_entry
9691             FROM url_verify.session uvs
9692             JOIN container.biblio_record_entry_bucket cbreb
9693                 ON (uvs.container = cbreb.id)
9694             JOIN container.biblio_record_entry_bucket_item cbrebi
9695                 ON (cbrebi.bucket = cbreb.id)
9696         </oils_persist:source_definition>
9697         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9698             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9699             <field reporter:label="Session" name="session" reporter:datatype="link" />
9700             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9701             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9702         </fields>
9703         <links>
9704             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9705             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9706             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9707         </links>
9708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9709             <actions>
9710                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9711             </actions>
9712         </permacrud>
9713     </class>
9714
9715     <class
9716         id="uvus"
9717         controller="open-ils.cstore open-ils.pcrud"
9718         oils_obj:fieldmapper="url_verify::url_selector"
9719         oils_persist:tablename="url_verify.url_selector"
9720         reporter:label="URL Verification URL Selector"
9721     >
9722         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9723             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9724             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9725                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9726             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9727         </fields>
9728
9729         <links>
9730             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9731             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9732         </links>
9733
9734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9735             <actions>
9736                 <create permission="URL_VERIFY">
9737                     <context link="session" field="owning_lib"/>
9738                 </create>
9739                 <retrieve permission="URL_VERIFY">
9740                     <context link="session" field="owning_lib"/>
9741                 </retrieve>
9742                 <update permission="URL_VERIFY">
9743                     <context link="session" field="owning_lib"/>
9744                 </update>
9745                 <delete permission="URL_VERIFY">
9746                     <context link="session" field="owning_lib"/>
9747                 </delete>
9748             </actions>
9749         </permacrud>
9750
9751     </class>
9752
9753     <class
9754         id="uvu"
9755         controller="open-ils.cstore open-ils.pcrud"
9756         oils_obj:fieldmapper="url_verify::url"
9757         oils_persist:tablename="url_verify.url"
9758         reporter:label="URL Verification URL"
9759     >
9760         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9761             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9762                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9763                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9764                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9765                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9766             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9767             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9768             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9769             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9770             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9771             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9772             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9773             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9774             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9775             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9776             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9777             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9778             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9779         </fields>
9780
9781         <links>
9782             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9783             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9784             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9785             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9786             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9787         </links>
9788
9789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9790             <actions>
9791                 <create permission="URL_VERIFY">
9792                     <context link="session" field="owning_lib"/>
9793                 </create>
9794                 <retrieve permission="URL_VERIFY">
9795                     <context link="session" field="owning_lib"/>
9796                 </retrieve>
9797                 <update permission="URL_VERIFY">
9798                     <context link="session" field="owning_lib"/>
9799                 </update>
9800                 <delete permission="URL_VERIFY">
9801                     <context link="session" field="owning_lib"/>
9802                 </delete>
9803             </actions>
9804         </permacrud>
9805
9806     </class>
9807
9808     <class
9809         id="uvva"
9810         controller="open-ils.cstore open-ils.pcrud"
9811         oils_obj:fieldmapper="url_verify::verification_attempt"
9812         oils_persist:tablename="url_verify.verification_attempt"
9813         reporter:label="URL Verification Attempt"
9814     >
9815         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9816             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9817                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9818                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9819             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9820             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9821         </fields>
9822
9823         <links>
9824             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9825             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9826         </links>
9827
9828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9829             <actions>
9830                 <create permission="URL_VERIFY">
9831                     <context link="session" field="owning_lib"/>
9832                 </create>
9833                 <retrieve permission="URL_VERIFY">
9834                     <context link="session" field="owning_lib"/>
9835                 </retrieve>
9836                 <update permission="URL_VERIFY">
9837                     <context link="session" field="owning_lib"/>
9838                 </update>
9839                 <delete permission="URL_VERIFY">
9840                     <context link="session" field="owning_lib"/>
9841                 </delete>
9842             </actions>
9843         </permacrud>
9844
9845     </class>
9846
9847     <class
9848         id="uvuv"
9849         controller="open-ils.cstore open-ils.pcrud"
9850         oils_obj:fieldmapper="url_verify::url_verification"
9851         oils_persist:tablename="url_verify.url_verification"
9852         reporter:label="URL Verification"
9853     >
9854         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9855             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9856                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9857                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9858             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9859             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9860             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9861             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9862                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9863         </fields>
9864
9865         <links>
9866             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9867             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9868             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9869         </links>
9870
9871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9872             <actions>
9873                 <create permission="URL_VERIFY">
9874                     <context link="attempt" jump="session" field="owning_lib"/>
9875                 </create>
9876                 <retrieve permission="URL_VERIFY">
9877                     <context link="attempt" jump="session" field="owning_lib"/>
9878                 </retrieve>
9879                 <update permission="URL_VERIFY">
9880                     <context link="attempt" jump="session" field="owning_lib"/>
9881                 </update>
9882                 <delete permission="URL_VERIFY">
9883                     <context link="attempt" jump="session" field="owning_lib"/>
9884                 </delete>
9885             </actions>
9886         </permacrud>
9887
9888     </class>
9889
9890         <class
9891                 id="cfdi"
9892                 controller="open-ils.cstore open-ils.pcrud"
9893                 oils_obj:fieldmapper="config::filter_dialog_interface"
9894                 oils_persist:tablename="config.filter_dialog_interface"
9895                 reporter:label="FilterDialog Interface">
9896                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9897                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9898                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9899                 </fields>
9900                 <links>
9901                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9902                 </links>
9903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9904                         <actions>
9905                                 <retrieve />
9906                         </actions>
9907                 </permacrud>
9908         </class>
9909
9910         <class
9911                 id="cfdfs"
9912                 controller="open-ils.cstore open-ils.pcrud"
9913                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9914                 oils_persist:tablename="config.filter_dialog_filter_set"
9915                 reporter:label="FilterDialog Filter Set">
9916                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9917                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9918                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9919                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9920                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9921                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9922                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9923                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9924                 </fields>
9925                 <links>
9926                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9927                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9928                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9929                 </links>
9930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9931                         <actions>
9932                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9933                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9934                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9935                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9936                         </actions>
9937                 </permacrud>
9938
9939         </class>
9940
9941         <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">
9942                 <fields oils_persist:primary="code">
9943                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9944                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9945                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9946                 </fields>
9947                 <links/>
9948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9949                         <actions>
9950                                 <retrieve/>
9951                         </actions>
9952                 </permacrud>
9953         </class>
9954
9955         <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">
9956                 <oils_persist:source_definition>
9957
9958             SELECT  b.id,
9959                     MAX(dcp.edit_date) AS last_delete_date
9960              FROM   biblio.record_entry b
9961                     JOIN asset.call_number cn ON (cn.record = b.id)
9962                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9963              WHERE  NOT b.deleted
9964              GROUP BY b.id
9965              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9966
9967                 </oils_persist:source_definition>
9968                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9969                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9970                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9971                 </fields>
9972                 <links>
9973                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9974                 </links>
9975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9976                         <actions>
9977                                 <retrieve/>
9978                         </actions>
9979                 </permacrud>
9980         </class>
9981
9982         <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">
9983                 <oils_persist:source_definition>
9984
9985             -- -- 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.
9986             -- -- 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
9987             -- -- may not.
9988             -- SELECT
9989             --     bre.id AS "bib_id",
9990             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9991             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9992             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9993             -- FROM (
9994                 SELECT
9995                     y.bre AS "id",
9996                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9997                     y.hold_count AS "hold_count",
9998                     (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"
9999                 FROM (
10000                         SELECT
10001                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10002                             COUNT(*) AS "hold_count"
10003                         FROM action.hold_request h
10004                         WHERE
10005                             cancel_time IS NULL
10006                             AND fulfillment_time IS NULL
10007                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10008                         GROUP BY 1
10009                     )y LEFT JOIN (
10010                         SELECT 
10011                             (SELECT id
10012                                 FROM biblio.record_entry 
10013                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10014                             ) AS "bre", 
10015                             COUNT(*) AS "copy_count"
10016                         FROM asset.copy
10017                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10018                         WHERE copy.holdable 
10019                             AND NOT copy.deleted 
10020                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10021                         GROUP BY 1
10022                     )x ON x.bre = y.bre
10023                 -- )z RIGHT JOIN (
10024                 --     SELECT id
10025                 --     FROM biblio.record_entry
10026                 --     WHERE NOT deleted
10027                 -- )bre ON (z.bib_id = bre.id)
10028                 
10029
10030                 </oils_persist:source_definition>
10031                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10032                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10033                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10034                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10035                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10036                 </fields>
10037                 <links>
10038                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10039                 </links>
10040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10041                         <actions>
10042                                 <retrieve/>
10043                         </actions>
10044                 </permacrud>
10045         </class>
10046
10047         <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">
10048                 <oils_persist:source_definition>
10049             SELECT *,
10050                 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,
10051                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10052             FROM
10053                 (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
10054                     FROM
10055                         action.hold_request ahr
10056                         JOIN reporter.hold_request_record rhrr USING (id)
10057                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10058                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10059                     WHERE
10060                         ahr.cancel_time IS NULL
10061                         AND ahr.fulfillment_time IS NULL
10062                     GROUP BY bib_record, pickup_lib
10063                 )x
10064                 JOIN
10065                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10066                     FROM
10067                         action.hold_request ahr
10068                         JOIN reporter.hold_request_record rhrr USING (id)
10069                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10070                     WHERE
10071                         ahr.cancel_time IS NULL
10072                         AND ahr.fulfillment_time IS NULL
10073                     GROUP BY bib_record
10074                 )y
10075                 USING (id)
10076                 </oils_persist:source_definition>
10077                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10078                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10079                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10080                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10081                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10082                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10083                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10084                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10085                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10086                 </fields>
10087                 <links>
10088                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10089                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10090                 </links>
10091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10092                         <actions>
10093                                 <retrieve/>
10094                         </actions>
10095                 </permacrud>
10096         </class>
10097
10098         <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">
10099                 <oils_persist:source_definition>
10100             SELECT
10101                 ac.id,
10102                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10103                 MAX(actac.xact_start) AS last_circ
10104             FROM asset.copy ac
10105                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10106             GROUP BY ac.id
10107
10108             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10109             --SELECT
10110             --    ac.id,
10111             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10112             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10113             --FROM asset.copy ac
10114             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10115             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10116             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10117                 </oils_persist:source_definition>
10118                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10119                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10120                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10121                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10122                 </fields>
10123                 <links>
10124                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10125                 </links>
10126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10127                         <actions>
10128                                 <retrieve/>
10129                         </actions>
10130                 </permacrud>
10131         </class>
10132
10133         <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">
10134                 <fields oils_persist:primary="id">
10135                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10136                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10137                 </fields>
10138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10139                         <actions>
10140                                 <retrieve/>
10141                         </actions>
10142                 </permacrud>
10143         </class>
10144
10145         <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">
10146                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10147                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10148                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10149                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10150                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10151                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10152                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10153                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10154                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10155                 </fields>
10156                 <links>
10157                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10158                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10159                 </links>
10160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10161                         <actions>
10162                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10163                                 <retrieve/>
10164                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10165                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10166                         </actions>
10167                 </permacrud>
10168         </class>
10169
10170         <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">
10171                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10172                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10173                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10174                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10175                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10176                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10177                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10178                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10179                 </fields>
10180                 <links>
10181                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10182                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10183                 </links>
10184                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10185                         <actions>
10186                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10187                                 <retrieve/>
10188                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10189                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10190                         </actions>
10191                 </permacrud>
10192         </class>
10193
10194
10195         <!-- ********************************************************************************************************************* -->
10196         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10197         <!-- ********************************************************************************************************************* -->
10198         <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">
10199                 <fields oils_persist:primary="id">
10200                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10201                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10202                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10203                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10204                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10205                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10206                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10207                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10208                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10209                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10210                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10211                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10212                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10213                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10214                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10215                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10216                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10217                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10218                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10219                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10220                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10221                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10222                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10223                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10224                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10225                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10226                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10227                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10228                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10229                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10230                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10231                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10232                 </fields>
10233                 <links>
10234                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10235                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10236                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10237                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10238                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10239                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10240                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10241                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10242                 </links>
10243         </class>
10244
10245         <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">
10246                 <fields oils_persist:primary="id">
10247                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10248                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10249                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10250                 </fields>
10251                 <links>
10252                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10253                 </links>
10254         </class>
10255
10256         <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">
10257                 <fields oils_persist:primary="id">
10258                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10259                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10260                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10261                 </fields>
10262                 <links>
10263                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10264                 </links>
10265         </class>
10266
10267         <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">
10268                 <fields oils_persist:primary="id">
10269                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10270
10271                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10272                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10273                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10274
10275                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10276                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10277                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10278
10279                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10280                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10281
10282                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10283                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10284                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10285
10286                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10287                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10288
10289                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10290                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10291                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10292
10293                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10294                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10295                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10296
10297                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10298                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10299                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10300                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10301
10302                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10303                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10304
10305                 </fields>
10306                 <links>
10307                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10308                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10309                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10310                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10311                 </links>
10312         </class>
10313
10314         <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">
10315                 <oils_persist:source_definition>
10316
10317             SELECT
10318                 po.ordering_agency AS ordering_agency,
10319                 po.id AS purchase_order,
10320                 li.id AS lineitem,
10321                 lid.id AS lineitem_detail,
10322                 cpa.id AS claim_policy_action
10323             FROM
10324                 acq.lineitem_detail lid
10325                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10326                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10327                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10328                 JOIN acq.claim_policy_action cpa ON (
10329                     cpa.claim_policy = cp.id
10330
10331                     -- we only care about claim policy actions whose claim
10332                     -- interval we'd reached or exceeded
10333                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10334
10335                     -- filter out all claim policy actions where claim events
10336                     -- have occurred on or after the action's action_interval
10337                     AND NOT EXISTS (
10338                         SELECT 1
10339                         FROM
10340                             acq.claim_event evt
10341                             JOIN acq.claim claim ON (
10342                                 claim.id = evt.claim
10343                                 AND claim.lineitem_detail = lid.id
10344                             )
10345                         WHERE
10346                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10347                     )
10348                 )
10349             WHERE
10350                 lid.cancel_reason IS NULL
10351                 AND li.cancel_reason IS NULL -- belt/suspenders
10352                 AND po.cancel_reason IS NULL -- belt/suspenders
10353                 AND lid.recv_time IS NULL
10354                 AND po.state = 'on-order'
10355             ORDER BY 1, 2, 3, 4, 5
10356
10357                 </oils_persist:source_definition>
10358                 <fields>
10359                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10360                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10361                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10362                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10363                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10364                 </fields>
10365                 <links>
10366                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10367                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10368                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10369                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10370                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10371                 </links>
10372         </class>
10373         <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">
10374                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10375                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10376                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10377                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10378                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10379                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10380                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10381                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10382                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10383                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10384                 </fields>
10385                 <links>
10386                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10387                 </links>
10388     </class>
10389         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10390                 <oils_persist:source_definition>
10391             SELECT * FROM acq.lineitem_summary 
10392                                 WHERE item_count > (invoice_count + cancel_count)
10393         </oils_persist:source_definition>
10394                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10395                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10396                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10397                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10398                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10399                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10400                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10401                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10402                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10403                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10404                 </fields>
10405                 <links>
10406                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10407                 </links>
10408     </class>
10409         <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">
10410                 <oils_persist:source_definition>
10411
10412                         SELECT  t.*
10413                           FROM  action.transit_copy t
10414                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10415                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10416                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10417
10418                 </oils_persist:source_definition>
10419                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10420                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10421                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10422                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10423                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10424                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10425                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10426                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10427                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10428                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10429                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10430                 </fields>
10431                 <links>
10432                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10433                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10434                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10435                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10436                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10437                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10438                 </links>
10439         </class>
10440
10441     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10442                 <oils_persist:source_definition>
10443
10444         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10445                 SELECT
10446                         cp.id as copy,
10447                         COUNT(circ.id),
10448                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10449                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10450                 FROM
10451                         asset.copy cp
10452                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10453                 GROUP BY 1, 3, 4
10454                 UNION ALL
10455                 SELECT
10456                         cp.id as copy,
10457                         COUNT(circ.id),
10458                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10459                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10460                 FROM
10461                         asset.copy cp
10462                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10463                 GROUP BY 1, 3, 4
10464                 UNION ALL
10465                 SELECT
10466                         id as copy,
10467                         circ_count,
10468                         -1 AS year,
10469                         false as is_renewal
10470                 FROM
10471                         extend_reporter.legacy_circ_count
10472         )x GROUP BY 1, 3, 4
10473
10474                 </oils_persist:source_definition>
10475         <fields>
10476             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10477             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10478             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10479             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10480         </fields>
10481                 <links>
10482                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10483                 </links>
10484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10485                         <actions>
10486                                 <retrieve/>
10487                         </actions>
10488                 </permacrud>
10489     </class>
10490
10491         <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">
10492                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10493                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10494                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10495                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10496                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10497                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10498                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10499                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10500                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10501                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10502                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10503                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10504                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10505                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10506                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10507                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10508                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10509                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10510                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10511                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10512                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10513                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10514                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10515                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10516                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10517                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10518                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10519                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10520                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10521                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10522                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10523                 </fields>
10524                 <links>
10525                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10526                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10527                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10528                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10529                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10530                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10531                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10532                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10533                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10534                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10535                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10536                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10537                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10538                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10539                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10540                 </links>
10541         </class>
10542
10543     <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">
10544         <fields oils_persist:primary="id">
10545             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10546             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10547             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10548             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10549             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10550             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10551             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10552             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10553             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10554             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10555             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10556             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10557             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10558             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10559             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10560             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10561             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10562             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10563             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10564             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10565             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10566             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10567             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10568             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10569             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10570             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10571             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10572             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10573             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10574             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10575             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10576             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10577             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10578             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10579         </fields>
10580         <links>
10581             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10582             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10583             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10584             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10585             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10586         </links>
10587     </class>
10588
10589     <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">
10590         <fields oils_persist:primary="id">
10591             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10592             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10593             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10594             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10595         </fields>
10596         <links>
10597             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10598             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10599         </links>
10600     </class>
10601
10602     <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">
10603         <fields oils_persist:primary="owning_lib">
10604             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10605             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10606             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10607         </fields>
10608         <links>
10609             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10610         </links>
10611     </class>
10612
10613     <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">
10614         <fields oils_persist:primary="id">
10615             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10616             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10617             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10618             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10619             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10620         </fields>
10621         <links>
10622             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10623             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10624             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10625         </links>
10626     </class>
10627
10628     <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">
10629         <fields oils_persist:primary="circ_lib">
10630             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10631             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10632             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10633             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10634         </fields>
10635         <links>
10636             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10637             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10638         </links>
10639     </class>
10640
10641     <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">
10642         <fields oils_persist:primary="id">
10643             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10644             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10645             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10646             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10647             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10648         </fields>
10649         <links>
10650             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10651             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10652             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10653         </links>
10654     </class>
10655
10656     <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">
10657         <fields oils_persist:primary="home_ou">
10658             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10659             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10660             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10661             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10662         </fields>
10663         <links>
10664             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10665             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10666         </links>
10667     </class>
10668         <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">
10669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10670                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10671                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10672                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10673                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10674                 </fields>
10675                 <links>
10676                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10677                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10678                 </links>
10679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10680                         <actions>
10681                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10682                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10683                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10684                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10685                         </actions>
10686                 </permacrud>
10687         </class>
10688         <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">
10689                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10690                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10691                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10692                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10693                 </fields>
10694                 <links>
10695                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10696                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10697                         </links>
10698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10699                 <actions>
10700                                 <create permission="ADMIN_ACQ_FUND_TAG">
10701                                         <context link="tag" field="owner"/>
10702                                 </create>
10703                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10704                                         <context link="tag" field="owner"/>
10705                                 </retrieve>
10706                                 <update permission="ADMIN_ACQ_FUND_TAG">
10707                                         <context link="tag" field="owner"/>
10708                                 </update>
10709                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10710                                         <context link="tag" field="owner"/>
10711                                 </delete>
10712                         </actions>
10713                 </permacrud>
10714         </class>
10715         <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">
10716                 <oils_persist:source_definition><![CDATA[
10717                 SELECT
10718                         poi.purchase_order AS purchase_order,
10719                         ii.invoice AS invoice,
10720                         NULL AS lineitem,
10721                         poi.id AS po_item,
10722                         NULL AS picklist
10723                 FROM
10724                         acq.po_item poi
10725                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10726                 UNION SELECT
10727                         jub.purchase_order AS purchase_order,
10728                         ie.invoice AS invoice,
10729                         jub.id AS lineitem,
10730                         NULL AS po_item,
10731                         jub.picklist AS picklist
10732                 FROM
10733                         acq.lineitem jub
10734                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10735                 UNION SELECT
10736                         ii.purchase_order AS purchase_order,
10737                         ii.invoice AS invoice,
10738                         NULL AS lineitem,
10739                         NULL AS po_item,
10740                         NULL AS picklist
10741                 FROM
10742                         acq.invoice_item ii
10743                 WHERE ii.po_item IS NULL
10744                 UNION SELECT
10745                         ie.purchase_order AS purchase_order,
10746                         ie.invoice AS invoice,
10747                         NULL AS lineitem,
10748                         NULL AS po_item,
10749                         NULL AS picklist
10750                 FROM
10751                         acq.invoice_entry ie
10752                 WHERE ie.lineitem IS NULL
10753                 UNION SELECT
10754                         NULL AS purchase_order,
10755                         NULL AS invoice,
10756                         jub.id AS lineitem,
10757                         NULL AS po_item,
10758                         jub.picklist AS picklist
10759                 FROM
10760                         acq.lineitem jub
10761                 WHERE jub.purchase_order IS NULL
10762                 ]]></oils_persist:source_definition>
10763                 <fields>
10764                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10765                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10766                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10767                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10768                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10769                 </fields>
10770                 <links>
10771                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10772                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10773                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10774                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10775                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10776                 </links>
10777         </class>
10778         <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">
10779                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10780                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10781                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10782                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10783                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10784                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10785                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10786                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10787                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10788                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10789                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10790                 </fields>
10791                 <links>
10792                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10793                 </links>
10794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10795                         <actions>
10796                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10797                                 <retrieve/>
10798                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10799                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10800                         </actions>
10801                 </permacrud>
10802         </class>
10803
10804         <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">
10805                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10806                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10807                         <field name="date_applied" reporter:datatype="timestamp"/>
10808                         <field name="org" reporter:datatype="org_unit"/>
10809                         <field name="original_value" reporter:datatype="text"/>
10810                         <field name="new_value" reporter:datatype="text"/>
10811                         <field name="field_name" reporter:datatype="link"/>
10812                 </fields>
10813                 <links>
10814                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10815                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10816                 </links>
10817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10818                         <actions>
10819                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10820                                 <retrieve/>
10821                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10822                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10823                         </actions>
10824                 </permacrud>
10825         </class>
10826         <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">
10827                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10828                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10829                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10830                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10831                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10832                 </fields>
10833                 <links>
10834                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10835                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10836                 </links>
10837         </class>
10838         <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">
10839                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10840                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10841                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10842                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10843                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10844                 </fields>
10845                 <links>
10846                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10847                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10848                 </links>
10849         </class>
10850         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
10851                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
10852                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10853                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10854                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
10855                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
10856                 </fields>
10857                 <links>
10858                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
10859                 </links>
10860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10861                         <actions>
10862                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10863                                 <retrieve/>
10864                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10865                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10866                         </actions>
10867                 </permacrud>
10868         </class>
10869         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
10870                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
10871                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10872                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
10873                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
10874                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
10875                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
10876                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
10877                 </fields>
10878                 <links>
10879                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
10880                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
10881                 </links>
10882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10883                         <actions>
10884                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10885                                 <retrieve/>
10886                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10887                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10888                         </actions>
10889                 </permacrud>
10890         </class>
10891
10892         <!-- ********************************************************************************************************************* -->
10893
10894 </IDL>
10895
10896 <!--
10897     vim:noet:ts=4:sw=4:
10898 -->