]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
MOPAC: Remove fixed height from fines tabs
[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="Is Floating" name="floating" reporter:datatype="bool"/>
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                 </links>
4695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4696                         <actions>
4697                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4698                                 <retrieve/>
4699                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4700                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4701                         </actions>
4702                 </permacrud>
4703         </class>
4704
4705         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4706                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4707                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4708                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4709                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4710                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4711                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4712                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4713                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4714                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4715                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4716                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4717                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4718                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4719                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4720                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4721                 </fields>
4722                 <links>
4723                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4724                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4725                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4726                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4727                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4728                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4729                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4730                 </links>
4731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4732                         <actions>
4733                                 <create permission="ADMIN_SERIAL_ITEM">
4734                                         <context link="stream" jump="distribution" field="holding_lib" />
4735                                 </create>
4736                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4737                                         <context link="stream" jump="distribution" field="holding_lib" />
4738                                 </retrieve>
4739                                 <update permission="ADMIN_SERIAL_ITEM">
4740                                         <context link="stream" jump="distribution" field="holding_lib" />
4741                                 </update>
4742                                 <delete permission="ADMIN_SERIAL_ITEM">
4743                                         <context link="stream" jump="distribution" field="holding_lib" />
4744                                 </delete>
4745                         </actions>
4746                 </permacrud>
4747         </class>
4748
4749         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4751                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4752                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4753                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4754                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4755                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4756                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4757                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4758                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4759                 </fields>
4760                 <links>
4761                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4762                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4763                 </links>
4764                 <!-- Not available via PCRUD at this time -->
4765         </class>
4766         <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">
4767                 <fields>
4768                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4769                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4770                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4771                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4772                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4773                 </fields>
4774                 <links>
4775                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4776                 </links>
4777         </class>
4778         <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">
4779                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4780                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4781                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4782                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4783                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4784                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4785                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4786                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4787                 </fields>
4788                 <links>
4789                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4790                 </links>
4791         </class>
4792         <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">
4793                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4794                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4795                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4796                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4797                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4798                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4799                 </fields>
4800                 <links>
4801                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4802                 </links>
4803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4804                         <actions>
4805                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4806                                         <context link="distribution" field="holding_lib" />
4807                                 </create>
4808                                 <retrieve/>
4809                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4810                                         <context link="distribution" field="holding_lib" />
4811                                 </update>
4812                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4813                                         <context link="distribution" field="holding_lib" />
4814                                 </delete>
4815                         </actions>
4816                 </permacrud>
4817         </class>
4818
4819         <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">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4821                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4822                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4823                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4824                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4825                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4826                 </fields>
4827                 <links>
4828                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4829                 </links>
4830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4831                         <actions>
4832                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4833                                         <context link="distribution" field="holding_lib" />
4834                                 </create>
4835                                 <retrieve/>
4836                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4837                                         <context link="distribution" field="holding_lib" />
4838                                 </update>
4839                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4840                                         <context link="distribution" field="holding_lib" />
4841                                 </delete>
4842                         </actions>
4843                 </permacrud>
4844         </class>
4845
4846         <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">
4847                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4848                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4849                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4850                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4851                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4852                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4853                 </fields>
4854                 <links>
4855                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4856                 </links>
4857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4858                         <actions>
4859                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4860                                         <context link="distribution" field="holding_lib" />
4861                                 </create>
4862                                 <retrieve/>
4863                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4864                                         <context link="distribution" field="holding_lib" />
4865                                 </update>
4866                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4867                                         <context link="distribution" field="holding_lib" />
4868                                 </delete>
4869                         </actions>
4870                 </permacrud>
4871         </class>
4872
4873         <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">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4875                         <field name="id" reporter:datatype="id" />
4876                         <field name="owning_copy" reporter:datatype="link"/>
4877                         <field name="stat_cat" reporter:datatype="link"/>
4878                         <field name="stat_cat_entry" reporter:datatype="link"/>
4879                 </fields>
4880                 <links>
4881                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4882                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4883                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4884                 </links>
4885         </class>
4886         <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">
4887                 <fields oils_persist:primary="code">
4888                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4889                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4890                 </fields>
4891                 <links/>
4892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4893             <actions>
4894                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4895                 <retrieve/>
4896                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4897                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4898             </actions>
4899         </permacrud>
4900         </class>
4901         <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">
4902                 <fields oils_persist:primary="code">
4903                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4904                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4905                 </fields>
4906                 <links/>
4907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4908             <actions>
4909                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4910                 <retrieve/>
4911                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4912                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4913             </actions>
4914         </permacrud>
4915         </class>
4916         <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">
4917                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4918                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4919                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4920                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4921                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4922                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4923                 </fields>
4924                 <links>
4925             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4926         </links>
4927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4928             <actions>
4929                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4930                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4931                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4932                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4933             </actions>
4934         </permacrud>
4935         </class>
4936         <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">
4937                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4938                         <field name="id" reporter:datatype="id" />
4939                         <field name="name" reporter:datatype="text"/>
4940                 </fields>
4941                 <links/>
4942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4943             <actions>
4944                 <create permission="CREATE_LASSO" global_required="true"/>
4945                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4946                 <update permission="UPDATE_LASSO" global_required="true"/>
4947                 <delete permission="DELETE_LASSO" global_required="true"/>
4948             </actions>
4949         </permacrud>
4950         </class>
4951         <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">
4952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4953                         <field name="id" reporter:datatype="id" />
4954                         <field name="lasso" reporter:datatype="link"/>
4955                         <field name="org_unit" reporter:datatype="org_unit"/>
4956                 </fields>
4957                 <links>
4958                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4959                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4960                 </links>
4961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4962             <actions>
4963                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4964                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4965                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4966                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4967             </actions>
4968         </permacrud>
4969         </class>
4970         <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">
4971                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4972                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4973                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4974                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4975                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4976                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4977                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4978                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4979                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4980                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4981                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4982                 </fields>
4983                 <links>
4984                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4985                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4986                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4987                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4988                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4989                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4990                 </links>
4991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4992             <actions>
4993                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4994                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4995                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4996                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4997             </actions>
4998         </permacrud>
4999         </class>
5000         <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">
5001                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5002                         <field name="id" reporter:datatype="id" />
5003                         <field name="from_org" reporter:datatype="org_unit"/>
5004                         <field name="to_org" reporter:datatype="org_unit"/>
5005                         <field name="prox" reporter:datatype="int" />
5006                 </fields>
5007                 <links>
5008                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5009                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5010                 </links>
5011         </class>
5012         <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">
5013                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5014                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5015                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5016                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5017                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5018                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5019                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5020                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5021                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5022                 </fields>
5023                 <links/>
5024         </class>
5025         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5026                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5027                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5028                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5030                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5032                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5033                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5034                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5035                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5036                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5037                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5038                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5039                 </fields>
5040                 <links>
5041                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5042                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5043                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5044                 </links>
5045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5046             <actions>
5047                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5048                 <retrieve/>
5049                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5050                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5051             </actions>
5052         </permacrud>
5053         </class>
5054         <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">
5055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5056                         <field name="address_type"  reporter:datatype="text"/>
5057                         <field name="city"  reporter:datatype="text"/>
5058                         <field name="country"  reporter:datatype="text"/>
5059                         <field name="county"  reporter:datatype="text"/>
5060                         <field name="id" reporter:datatype="id" />
5061                         <field name="org_unit" reporter:datatype="org_unit"/>
5062                         <field name="post_code"  reporter:datatype="text"/>
5063                         <field name="state"  reporter:datatype="text"/>
5064                         <field name="street1"  reporter:datatype="text"/>
5065                         <field name="street2"  reporter:datatype="text"/>
5066                         <field name="valid" reporter:datatype="bool"/>
5067                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5068                 </fields>
5069                 <links>
5070                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5071                 </links>
5072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5073             <actions>
5074                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5075                 <retrieve/>
5076                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5077                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5078             </actions>
5079         </permacrud>
5080         </class>
5081         <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">
5082                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5083                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5084                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5085                         <field name="query_text" reporter:datatype="text"/>
5086                 </fields>
5087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5088             <actions>
5089                 <retrieve/>
5090             </actions>
5091         </permacrud>
5092         </class>
5093
5094         <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">
5095                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5096                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5097                         <field name="owner" reporter:datatype="org_unit"/>
5098                         <field name="code" reporter:datatype="text"/>
5099                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5100                         <field name="create_date" reporter:datatype="timestamp"/>
5101                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5102                 </fields>
5103                 <links>
5104                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5105                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5106                 </links>
5107         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5108             <actions>
5109                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5110                 <retrieve/>
5111                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5112                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5113             </actions>
5114         </permacrud>
5115         </class>
5116         <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">
5117                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5118                         <field name="id" reporter:datatype="id"/>
5119                         <field name="grp" reporter:datatype="link"/>
5120                         <field name="pos" reporter:datatype="int"/>
5121                         <field name="query" reporter:datatype="link"/>
5122                 </fields>
5123                 <links>
5124                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5125                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5126                 </links>
5127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5128             <actions>
5129                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5130                     <context link="grp" field="owner"/>
5131                 </create>
5132                 <retrieve/>
5133                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5134                     <context link="grp" field="owner"/>
5135                 </update>
5136                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5137                     <context link="grp" field="owner"/>
5138                 </delete>
5139             </actions>
5140         </permacrud>
5141         </class>
5142
5143         <!-- A note: Please update alhr and ahopl when updating ahr -->
5144         <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">
5145                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5146                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5147                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5148                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5150                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5151                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5153                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5154                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5155                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5156                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5157                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5158                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5159                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5160                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5161                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5162                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5163                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5164                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5166                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5167                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5168                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5169                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5170                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5171                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5173                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5174                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5175                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5176                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5177                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5180                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5181                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5182                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5183                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5184                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5185                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5186                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5187                 </fields>
5188                 <links>
5189                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5190                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5191                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5192                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5193                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5194                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5195                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5196                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5197                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5198                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5199                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5200                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5201                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5202                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5203                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5204                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5205                 </links>
5206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207                         <actions>
5208                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212         <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">
5213                 <oils_persist:source_definition><![CDATA[
5214                 SELECT
5215                         ahr.*,
5216                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5217                                 copy_location_order_position,
5218                         CASE WHEN au.alias IS NOT NULL THEN
5219                                 au.alias
5220                         ELSE
5221                                 au.first_given_name
5222                         END AS usr_alias_or_first_given_name,
5223                         au.first_given_name AS usr_first_given_name,
5224                         au.second_given_name AS usr_second_given_name,
5225                         au.family_name AS usr_family_name,
5226                         au.prefix AS usr_prefix,
5227                         au.suffix AS usr_suffix,
5228                         au.alias AS usr_alias,
5229                         CASE WHEN au.alias IS NOT NULL THEN
5230                                 au.alias
5231                         ELSE
5232                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5233                                         COALESCE(au.family_name, ''),
5234                                         COALESCE(au.suffix, ''),
5235                                         ', ',
5236                                         COALESCE(au.prefix, ''),
5237                                         COALESCE(au.first_given_name, ''),
5238                                         COALESCE(au.second_given_name, '')
5239                                 ], ' '), E'\\s+,', ',')
5240                         END AS usr_alias_or_display_name,
5241                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5242                                 COALESCE(au.family_name, ''),
5243                                 COALESCE(au.suffix, ''),
5244                                 ', ',
5245                                 COALESCE(au.prefix, ''),
5246                                 COALESCE(au.first_given_name, ''),
5247                                 COALESCE(au.second_given_name, '')
5248                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5249                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5250                                 AS call_number_label,
5251                         siss.label AS issuance_label,
5252                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5253                         ahcm_1.copy_count AS potential_copies
5254                 FROM action.hold_request ahr
5255                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5256                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5257                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5258                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5259                 JOIN actor.usr au ON (au.id = ahr.usr)
5260                 JOIN (
5261                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5262                         FROM asset.copy_location
5263                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5264                 LEFT JOIN actor.usr_standing_penalty ausp 
5265                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5266                 LEFT JOIN config.standing_penalty csp
5267                         ON (
5268                                 csp.id = ausp.standing_penalty AND 
5269                                 csp.block_list LIKE '%CAPTURE%' AND (
5270                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5271                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5272                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5273                                         )
5274                                 )
5275                         )
5276                 JOIN (
5277                         SELECT COUNT(target_copy) AS copy_count, hold
5278                         FROM action.hold_copy_map
5279                         GROUP BY 2
5280                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5281                 LEFT JOIN serial.issuance siss
5282                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5283                 LEFT JOIN asset.copy_location_order acplo
5284                         ON (acp.location = acplo.location AND
5285                                 acp.circ_lib = acplo.org)
5286                 WHERE
5287                         ahr.capture_time IS NULL AND
5288                         ahr.cancel_time IS NULL AND
5289                         csp.id IS NULL AND
5290                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5291                 ]]></oils_persist:source_definition>
5292                 <fields oils_persist:primary="id">
5293                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5294                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5295                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5296                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5297                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5298                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5300                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5301                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5302                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5303                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5304                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5305                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5306                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5307                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5308                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5309                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5310                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5311                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5312                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5313                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5314                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5315                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5316                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5317                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5318                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5320                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5323                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5324                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5325                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5327                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5328                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5329                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5330                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5331                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5332                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5333                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5334                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5335                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5336                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5337                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5338                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5339                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5340                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5341                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5342                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5343                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5344                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5345                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5346                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5347                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5348                 </fields>
5349                 <links>
5350                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5351                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5352                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5353                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5355                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5356                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5357                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5358                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5359                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5360                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5361                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5362                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5363                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5364                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5365                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5366                 </links>
5367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5368                         <actions>
5369                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5370                         </actions>
5371                 </permacrud>
5372         </class>
5373         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5374                 <oils_persist:source_definition>
5375                         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)
5376                 </oils_persist:source_definition>
5377                 <fields oils_persist:primary="id">
5378                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5379                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5380                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5381                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5382                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5383                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5384                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5385                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5386                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5387                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5388                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5389                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5390                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5391                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5392                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5393                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5394                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5395                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5396                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5397                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5398                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5399                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5400                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5401                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5403                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5404                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5405                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5406                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5407                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5408                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5409                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5410                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5411                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5412                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5413                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5414                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5415                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5416                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5417                 </fields>
5418                 <links>
5419                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5420                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5421                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5422                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5423                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5424                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5425                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5426                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5427                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5428                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5429                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5430                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5431                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5432                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5433                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5434                 </links>
5435         </class>
5436
5437         <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">
5438                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5439                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5440                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5441                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5442                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5443                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5444                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5445                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5446                 </fields>
5447                 <links>
5448                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5449                 </links>
5450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5451                         <actions>
5452                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5453                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5454                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5455                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5456                         </actions>
5457                 </permacrud>
5458         </class>
5459         <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">
5460                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5461                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5462                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5463                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5464                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5465                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5467                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5468                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5469                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5470                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5471                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5472                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5473                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5474                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5475                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5476                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5477                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5478                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5479                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5480                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5481                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5482                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5483                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5484                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5485                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5486                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5487                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5488                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5489                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5490                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5491                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5492                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5493                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5494                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5495                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5496                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5497                 </fields>
5498                 <links>
5499                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5500                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5501                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5502                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5503                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5504                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5505                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5506                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5507                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5508                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5509                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5510                 </links>
5511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5512                         <actions>
5513                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5514                         </actions>
5515                 </permacrud>
5516         </class>
5517         <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">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5519                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5520                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5522                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5523                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5524                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5525                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5526                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5528                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5529                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5530                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5531                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5532                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5533                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5534                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5535                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5536                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5537                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5538                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5539                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5540                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5541                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5542                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5543                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5544                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5545                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5546                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5547                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5549                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5550                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5551                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5552                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5553                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5554                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5555                 </fields>
5556                 <links>
5557                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5558                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5559                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5560                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5562                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5563                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5564                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5565                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5566                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5567                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5568                 </links>
5569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5570                         <actions>
5571                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5572                         </actions>
5573                 </permacrud>
5574         </class>
5575
5576         <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">
5577                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5578                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5579                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5580                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5581                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5582                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5583                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5584                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5585                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5586                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5587                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5588                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5589                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5590                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5591                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5592                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5601                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5602                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5603                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5604                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5605                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5606                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5607                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5608                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5609                 </fields>
5610                 <links>
5611                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5612                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5613                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5614                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5615                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5616                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5617                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5618                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5619                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5620                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5621                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5622                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5623                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5624                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5625                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5626                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5627                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5628                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5629                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5630                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5631                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5632                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5633                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5634                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5635                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5636                 </links>
5637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5638             <actions>
5639                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5640                 <retrieve />
5641                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5642                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5643             </actions>
5644         </permacrud>
5645         </class>
5646         <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">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5648                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5649                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5650                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5651                 </fields>
5652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5653                         <actions>
5654                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5655                                 <retrieve/>
5656                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5657                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5658                         </actions>
5659                 </permacrud>
5660         </class>
5661         <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">
5662                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5663                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5664                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5665                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5666                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5667                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5668                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5669                 </fields>
5670                 <links>
5671                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5672                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5673                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5674                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5675                 </links>
5676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5677                         <actions>
5678                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5679                                 <retrieve/>
5680                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5681                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5682                         </actions>
5683                 </permacrud>
5684         </class>
5685         <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">
5686                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5687                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5688                         <field name="btype" reporter:datatype="text"/>
5689                         <field name="id" reporter:datatype="id" />
5690                         <field name="name"  reporter:datatype="text"/>
5691                         <field name="description" reporter:datatype="text"/>
5692                         <field name="owner" reporter:datatype="link"/>
5693                         <field name="pub" reporter:datatype="bool"/>
5694                         <field name="create_time" reporter:datatype="timestamp" />
5695                 </fields>
5696                 <links>
5697                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5698                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5699                 </links>
5700         </class>
5701         <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">
5702                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5703                         <field name="id" reporter:datatype="id" />
5704                         <field name="bucket" reporter:datatype="link"/>
5705                         <field name="note" reporter:datatype="text" />
5706                 </fields>
5707                 <links>
5708                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5709                 </links>
5710         </class>
5711         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5712                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5713                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5714                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5715                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5716                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5717                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5718                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5719                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5720                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5721                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5722                 </fields>
5723                 <links>
5724                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5725                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5726                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5727                 </links>
5728         </class>
5729         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5730                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5731                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5732                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5733                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5734                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5735                 </fields>
5736                 <links>
5737                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5738                 </links>
5739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5740                         <actions>
5741                                 <retrieve permission="VIEW_USER">
5742                                         <context link="usr" field="home_ou" />
5743                                 </retrieve>
5744                         </actions>
5745                 </permacrud>
5746         </class>
5747     <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">
5748         <fields oils_persist:primary="field">
5749             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5750             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5751             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5752         </fields>
5753         <links/>
5754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5755             <actions>
5756                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5757                 <retrieve />
5758                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5759                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5760             </actions>
5761         </permacrud>
5762     </class>
5763         <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">
5764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5765                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5766                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5767                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5768                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5769                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5770                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5771                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5772                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5773                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5774                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5775                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5776                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5777                 </fields>
5778                 <links>
5779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5780                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5781                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5782                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5783                 </links>
5784         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5785             <actions>
5786                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5787                 <retrieve />
5788                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5789                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5790             </actions>
5791         </permacrud>
5792         </class>
5793         <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">
5794                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5795                         <field name="field" reporter:datatype="link"/>
5796                         <field name="id" reporter:datatype="id" />
5797                         <field name="source" reporter:datatype="link"/>
5798                         <field name="value"  reporter:datatype="text"/>
5799                 </fields>
5800                 <links>
5801                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5802                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5803                 </links>
5804         </class>
5805         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5806                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5807                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5808                         <field name="btype" reporter:datatype="text"/>
5809                         <field name="id" reporter:datatype="id" />
5810                         <field name="name"  reporter:datatype="text"/>
5811                         <field name="description" reporter:datatype="text"/>
5812                         <field name="owner" reporter:datatype="link"/>
5813                         <field name="pub" reporter:datatype="bool"/>
5814                         <field name="create_time" reporter:datatype="timestamp" />
5815                 </fields>
5816                 <links>
5817                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5818                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5819                 </links>
5820         </class>
5821         <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">
5822                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5823                         <field name="id" reporter:datatype="id" />
5824                         <field name="bucket" reporter:datatype="link"/>
5825                         <field name="note" reporter:datatype="text" />
5826                 </fields>
5827                 <links>
5828                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5829                 </links>
5830         </class>
5831         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5832                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5833                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5834                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5835                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5836                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5837                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5838                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5839                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5840                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5841                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5842                 </fields>
5843                 <links>
5844                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5845                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5846                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5847                 </links>
5848         </class>
5849         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5850                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5851                         <field name="id" reporter:datatype="id" />
5852                         <field name="ind1" />
5853                         <field name="ind2" />
5854                         <field name="record" />
5855                         <field name="subfield" />
5856                         <field name="tag" />
5857                         <field name="value" />
5858                 </fields>
5859                 <links>
5860                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5861                 </links>
5862         </class>
5863         <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">
5864                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5865                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5866                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
5867                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
5868                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
5869                 </fields>
5870                 <links>
5871                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
5872                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
5873                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
5874                 </links>
5875         </class>
5876         <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">
5877                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5878                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5879                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5880                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5881                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5882                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5883                 </fields>
5884                 <links>
5885                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5886                 </links>
5887         </class>
5888         <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">
5889                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5890                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5892                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5893                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5894                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5895                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5896                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5897                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5898                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5899                 </fields>
5900                 <links>
5901                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5902                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5903                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5904                 </links>
5905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5906             <actions>
5907                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5908                 <retrieve/>
5909                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5910                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5911             </actions>
5912         </permacrud>
5913         </class>
5914         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5915                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5916                         <field name="create_date" reporter:datatype="timestamp"/>
5917                         <field name="creator" reporter:datatype="link"/>
5918                         <field name="edit_date" reporter:datatype="timestamp"/>
5919                         <field name="editor" reporter:datatype="link"/>
5920                         <field name="id" reporter:datatype="id" />
5921                         <field name="pub" reporter:datatype="bool"/>
5922                         <field name="record" reporter:datatype="link"/>
5923                         <field name="value"  reporter:datatype="text"/>
5924                 </fields>
5925                 <links>
5926                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5927                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5928                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5929                 </links>
5930         </class>
5931         <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">
5932                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5933                         <field name="balance_owed" reporter:datatype="money" />
5934                         <field name="total_owed" reporter:datatype="money" />
5935                         <field name="total_paid" reporter:datatype="money" />
5936                         <field name="usr" reporter:datatype="link"/>
5937                 </fields>
5938                 <links>
5939                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5940                 </links>
5941         </class>
5942         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5943                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5944                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5945                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5946                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5947                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5948                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5949                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5950                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5951                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5952                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5953                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5954                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5955                 </fields>
5956                 <links>
5957                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5958                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5959                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5960                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5961                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5962                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5963                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5964                 </links>
5965         </class>
5966         <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">
5967                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5968                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5969                         <field name="quality" reporter:datatype="int" />
5970                         <field name="source" reporter:datatype="text"/>
5971                         <field name="transcendant" reporter:datatype="bool"/>
5972                         <field name="can_have_copies" reporter:datatype="bool"/>
5973                 </fields>
5974                 <links/>
5975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5976             <actions>
5977                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5978                 <retrieve/>
5979                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5980                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5981             </actions>
5982         </permacrud>
5983         </class>
5984         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5985                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5986                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5987                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5988                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5989                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5990                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5991                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5992                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5993                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5994                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5995                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5996                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5997                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5998                 </fields>
5999                 <links>
6000                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6001                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6002                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6003                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6004                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6005                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6006                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6007                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6008                 </links>
6009         </class>
6010         <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">
6011                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6012                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6013                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6014                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6015                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6016                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6017                 </fields>
6018                 <links>
6019                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6021                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6022                 </links>
6023         </class>
6024         <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">
6025                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6026                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6027                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6028                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6029                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6030                 </fields>
6031                 <links>
6032                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6033                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6034                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6035                 </links>
6036         </class>
6037         <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">
6038                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6039                         <field name="bucket" reporter:datatype="link"/>
6040                         <field name="id" reporter:datatype="id" />
6041                         <field name="target_user" reporter:datatype="link"/>
6042                         <field name="create_time" reporter:datatype="timestamp" />
6043                         <field name="pos" reporter:datatype="int" />
6044                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6045                 </fields>
6046                 <links>
6047                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6048                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6049             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6050                 </links>
6051         </class>
6052         <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">
6053                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6054                         <field name="id" reporter:datatype="id" />
6055                         <field name="item" reporter:datatype="link"/>
6056                         <field name="note" reporter:datatype="text" />
6057                 </fields>
6058                 <links>
6059                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6060                 </links>
6061         </class>
6062         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6063                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6064                         <field name="balance_owed" reporter:datatype="money" />
6065                         <field name="total_owed" reporter:datatype="money" />
6066                         <field name="total_paid" reporter:datatype="money" />
6067                         <field name="usr" reporter:datatype="link"/>
6068                 </fields>
6069                 <links>
6070                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6071                 </links>
6072         </class>
6073         <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">
6074                 <fields oils_persist:primary="code" oils_persist:sequence="">
6075                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6076                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6077                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6078                 </fields>
6079                 <links/>
6080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6081             <actions>
6082                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6083                 <retrieve/>
6084                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6085                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6086             </actions>
6087         </permacrud>
6088         </class>
6089         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6090                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6091                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6092                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6093                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6094                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6095                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6096                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6097                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6098                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6099                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6100                 </fields>
6101                 <links>
6102                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6103                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6104                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6105                 </links>
6106         </class>
6107         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6108                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6109                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6110                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6111                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6112                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6113                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6114                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6115                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6116                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6117                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6118                 </fields>
6119                 <links>
6120                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6121                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6122                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6123                 </links>
6124         </class>
6125         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6126                 <fields oils_persist:primary="id" oils_persist:sequence="">
6127                         <field name="checkin_lib" reporter:datatype="link"/>
6128                         <field name="checkin_staff" reporter:datatype="link"/>
6129                         <field name="checkin_time" reporter:datatype="timestamp"/>
6130                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6131                         <field name="circ_staff" reporter:datatype="link"/>
6132                         <field name="desk_renewal" reporter:datatype="bool"/>
6133                         <field name="due_date" reporter:datatype="timestamp"/>
6134                         <field name="duration" reporter:datatype="interval"/>
6135                         <field name="duration_rule" reporter:datatype="link"/>
6136                         <field name="fine_interval" reporter:datatype="interval"/>
6137                         <field name="id" reporter:datatype="id" />
6138                         <field name="max_fine" reporter:datatype="money" />
6139                         <field name="max_fine_rule" reporter:datatype="link"/>
6140                         <field name="opac_renewal" reporter:datatype="bool"/>
6141                         <field name="phone_renewal" reporter:datatype="bool"/>
6142                         <field name="recurring_fine" reporter:datatype="money" />
6143                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6144                         <field name="renewal_remaining" reporter:datatype="int" />
6145             <field name="grace_period" reporter:datatype="interval" />
6146                         <field name="stop_fines" reporter:datatype="text"/>
6147                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6148                         <field name="target_copy" reporter:datatype="link"/>
6149                         <field name="usr" reporter:datatype="link"/>
6150                         <field name="xact_finish" reporter:datatype="timestamp" />
6151                         <field name="xact_start" reporter:datatype="timestamp" />
6152                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6153                 </fields>
6154                 <links>
6155                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6156                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6157                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6158                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6159                 </links>
6160         </class>
6161         <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">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6163                         <field name="field" reporter:datatype="link"/>
6164                         <field name="id" reporter:datatype="id" />
6165                         <field name="source" reporter:datatype="link"/>
6166                         <field name="value" reporter:datatype="text"/>
6167                 </fields>
6168                 <links>
6169                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6170                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6171                 </links>
6172         </class>
6173         <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">
6174                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6175                         <field name="high" reporter:datatype="money" />
6176                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6177                         <field name="low" reporter:datatype="money" />
6178                         <field name="name" reporter:datatype="text"/>
6179                         <field name="normal" reporter:datatype="money" />
6180                         <field name="recurrence_interval" reporter:datatype="interval"/>
6181             <field name="grace_period" reporter:datatype="interval" />
6182                 </fields>
6183                 <links/>
6184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6185             <actions>
6186                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6187                 <retrieve/>
6188                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6189                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6190             </actions>
6191         </permacrud>
6192         </class>
6193         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6195                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6196                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6197                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6198                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6199                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6200                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6201                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6202                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6203                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6204                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6205                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6206                 </fields>
6207                 <links>
6208                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6209                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6210                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6211                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6212                 </links>
6213         </class>
6214         <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">
6215                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6216                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6217                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6218                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6219                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6220                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6221                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6222                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6223                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6224                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6225                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6226                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6227                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6228                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6229                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6230                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6231                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6232                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6233                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6234                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6235                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6236                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6237                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6238                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6239                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6240                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6241                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6242                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6243                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6244                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6245                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6246                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6247                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6248                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6249                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6250                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6251                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6252                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6253                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6254                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6255                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6256                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6257                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6258                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6260                 </fields>
6261                 <links>
6262                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6263                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6264                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6265                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6266                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6267                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6268                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6269                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6270                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6271                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6272                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6273                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6274                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6275                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6276                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6277                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6278                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6279                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6280                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6281                 </links>
6282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6283             <actions>
6284                 <create permission="CREATE_COPY">
6285                     <context link="call_number" field="owning_lib"/>
6286                 </create>
6287                 <retrieve/>
6288                 <update permission="UPDATE_COPY">
6289                     <context link="call_number" field="owning_lib"/>
6290                 </update>
6291                 <delete permission="DELETE_COPY">
6292                     <context link="call_number" field="owning_lib"/>
6293                 </delete>
6294             </actions>
6295         </permacrud>
6296         </class>
6297
6298         <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">
6299                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6300                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6301                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6302                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6303                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6304                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6305                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6306                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6307                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6308                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6309                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6310                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6311                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6312                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6313                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6314                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6315                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6316                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6317                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6318                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6319                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6320                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6321                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6322                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6323                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6324                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6325                 </fields>
6326                 <links>
6327                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6328                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6329                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6330                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6331                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6332                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6333                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6334                 </links>
6335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6336                         <actions>
6337                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6338                                 <retrieve />
6339                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6340                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6341                         </actions>
6342                 </permacrud>
6343         </class>
6344
6345         <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">
6346                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6347                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6348                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6349                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6350                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6351                 </fields>
6352                 <links/>
6353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6354             <actions>
6355                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6356                 <retrieve/>
6357                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6358                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6359             </actions>
6360         </permacrud>
6361         </class>
6362         <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">
6363                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6364                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6365                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6366                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6367                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6368                 </fields>
6369                 <links/>
6370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6371             <actions>
6372                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6373                 <retrieve/>
6374                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6375                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6376             </actions>
6377         </permacrud>
6378         </class>
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6381                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6382                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6383                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6384                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6385                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6386                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6387                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6388                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6389                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6390                 </fields>
6391                 <links>
6392                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6393                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6394                 </links>
6395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6396             <actions>
6397                 <create permission="CREATE_PERM" global_required="true"/>
6398                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6399                 <update permission="UPDATE_PERM" global_required="true"/>
6400                 <delete permission="DELETE_PERM" global_required="true"/>
6401             </actions>
6402         </permacrud>
6403         </class>
6404         <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">
6405                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6406                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6407                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6408                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6409                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6410                 </fields>
6411                 <links>
6412                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6413                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6414                 </links>
6415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6416             <actions>
6417                 <create permission="ADMIN_SURVEY">
6418                     <context link="question" jump="survey" field="owner"/>
6419                 </create>
6420                 <retrieve/>
6421                 <update permission="ADMIN_SURVEY">
6422                     <context link="question" jump="survey" field="owner"/>
6423                 </update>
6424                 <delete permission="ADMIN_SURVEY">
6425                     <context link="question" jump="survey" field="owner"/>
6426                 </delete>
6427             </actions>
6428         </permacrud>
6429         </class>
6430         <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">
6431                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6432                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6433                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6434                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6435                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6436                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6437                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6438                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6439                 </fields>
6440                 <links>
6441                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6442                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6443                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6444                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6445                 </links>
6446         </class>
6447         <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">
6448                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6449                         <field name="balance_owed" reporter:datatype="money" />
6450                         <field name="total_owed" reporter:datatype="money" />
6451                         <field name="total_paid" reporter:datatype="money" />
6452                         <field name="usr" reporter:datatype="link"/>
6453                 </fields>
6454                 <links>
6455                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6456                 </links>
6457         </class>
6458         <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">
6459                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6460                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6461                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6462                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6463                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6464                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6465                 </fields>
6466                 <links>
6467                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6468                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6469                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6470                 </links>
6471         </class>
6472         <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">
6473                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6474                         <field name="field" reporter:datatype="link"/>
6475                         <field name="id" reporter:datatype="id" />
6476                         <field name="source" reporter:datatype="link"/>
6477                         <field name="value" reporter:datatype="text"/>
6478                 </fields>
6479                 <links>
6480                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6481                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6482                 </links>
6483         </class>
6484         <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">
6485                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6486                         <field name="field" reporter:datatype="link"/>
6487                         <field name="id" reporter:datatype="id" />
6488                         <field name="source" reporter:datatype="link"/>
6489                         <field name="value" reporter:datatype="text"/>
6490                 </fields>
6491                 <links>
6492                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6493                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6494                 </links>
6495         </class>
6496         <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">
6497                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6498                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6499                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6500                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6501                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6502                 </fields>
6503                 <links>
6504                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6505                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6506                 </links>
6507         </class>
6508         <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">
6509                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6510                         <field name="depth" reporter:datatype="int" />
6511                         <field name="grantable" reporter:datatype="bool"/>
6512                         <field name="grp" reporter:datatype="link"/>
6513                         <field name="id" reporter:datatype="id" />
6514                         <field name="perm" reporter:datatype="link"/>
6515                 </fields>
6516                 <links>
6517                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6518                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6519                 </links>
6520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6521             <actions>
6522                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6523                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6524                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6525                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6526             </actions>
6527         </permacrud>
6528         </class>
6529         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6530                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6531                         <field name="items" oils_persist:virtual="true" />
6532                         <field name="btype" reporter:datatype="text"/>
6533                         <field name="id" reporter:datatype="id" />
6534                         <field name="name" reporter:datatype="text"/>
6535                         <field name="description" reporter:datatype="text"/>
6536                         <field name="owner" reporter:datatype="link"/>
6537                         <field name="pub" reporter:datatype="bool"/>
6538                         <field name="create_time" reporter:datatype="timestamp" />
6539                 </fields>
6540                 <links>
6541                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6542                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6543                 </links>
6544         </class>
6545         <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">
6546                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6547                         <field name="id" reporter:datatype="id" />
6548                         <field name="bucket" reporter:datatype="link"/>
6549                         <field name="note" reporter:datatype="text" />
6550                 </fields>
6551                 <links>
6552                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6553                 </links>
6554         </class>
6555         <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">
6556                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6557                         <field name="id" reporter:datatype="int" />
6558                         <field name="usr" reporter:datatype="link"/>
6559                         <field name="work_ou" reporter:datatype="link"/>
6560                 </fields>
6561                 <links>
6562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6563                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6564                 </links>
6565         </class>
6566         <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">
6567                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6568                         <field name="depth" reporter:datatype="int"/>
6569                         <field name="grantable" reporter:datatype="bool"/>
6570                         <field name="id" reporter:datatype="id" />
6571                         <field name="perm" reporter:datatype="link"/>
6572                         <field name="usr" reporter:datatype="link"/>
6573                 </fields>
6574                 <links>
6575                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6576                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6577                 </links>
6578         </class>
6579         <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">
6580                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6581                         <field name="object_id" reporter:datatype="text"/>
6582                         <field name="grantable" reporter:datatype="bool"/>
6583                         <field name="id" reporter:datatype="id" />
6584                         <field name="perm" reporter:datatype="link"/>
6585                         <field name="usr" reporter:datatype="link"/>
6586                         <field name="object_type" reporter:datatype="text"/>
6587                 </fields>
6588                 <links>
6589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6590                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6591                 </links>
6592         </class>
6593         <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">
6594                 <fields oils_persist:primary="id" oils_persist:sequence="">
6595                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6596                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6597                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6598                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6599                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6600                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6601                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6602                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6603                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6604                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6605                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6606                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6607                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6608                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6609                 </fields>
6610                 <links>
6611                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6612                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6613                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6614                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6615                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6616                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6617                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6618                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6619                 </links>
6620         </class>
6621         <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">
6622                 <fields oils_persist:primary="id" oils_persist:sequence="">
6623                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6624                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6625                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6626                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6627                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6628                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6629                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6630                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6631                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6632                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6633                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6634                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6635                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6636                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6637                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6638                 </fields>
6639                 <links>
6640                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6641                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6642                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6643                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6644                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6645                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6646                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6647                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6648                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6649                 </links>
6650         </class>
6651         <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">
6652                 <fields oils_persist:primary="id" oils_persist:sequence="">
6653                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6654                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6655                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6656                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6657                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6658                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6659                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6660                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6661                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6662                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6663                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6664                 </fields>
6665                 <links>
6666                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6667                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6668                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6669                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6670                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6671                 </links>
6672         </class>
6673         <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">
6674                 <fields oils_persist:primary="id" oils_persist:sequence="">
6675                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6676                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6677                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6678                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6679                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6680                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6681                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6682                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6683                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6684                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6685                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6686                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6687                 </fields>
6688                 <links>
6689                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6690                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6691                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6692                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6693                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6694                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6695                 </links>
6696         </class>
6697         <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">
6698                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6699                         <field name="bucket" reporter:datatype="link"/>
6700                         <field name="id" reporter:datatype="id" />
6701                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6702                         <field name="create_time" reporter:datatype="timestamp" />
6703                         <field name="pos" reporter:datatype="int" />
6704                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6705                 </fields>
6706                 <links>
6707                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6708                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6709             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6710                 </links>
6711         </class>
6712         <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">
6713                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6714                         <field name="id" reporter:datatype="id" />
6715                         <field name="item" reporter:datatype="link"/>
6716                         <field name="note" reporter:datatype="text" />
6717                 </fields>
6718                 <links>
6719                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6720                 </links>
6721         </class>
6722         <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">
6723                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6724                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6725                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6726                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6727                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6728                 </fields>
6729                 <links>
6730                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6731                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6732                 </links>
6733         </class>
6734     <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">
6735         <fields oils_persist:primary="field">
6736             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6737             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6738             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6739         </fields>
6740         <links/>
6741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6742             <actions>
6743                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6744                 <retrieve />
6745                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6746                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6747             </actions>
6748         </permacrud>
6749     </class>
6750         <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">
6751                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6752                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6753                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6754                 </fields>
6755                 <links/>
6756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6757             <actions>
6758                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6759                 <retrieve/>
6760                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6761                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6762             </actions>
6763         </permacrud>
6764         </class>
6765
6766
6767         <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">
6768                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6769                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6770                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6771                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6772                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6773                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6774                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6775                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6776                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6777                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6778                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6779                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6780                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6781                 </fields>
6782                 <links>
6783                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6784                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6785                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6786                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6787                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6788                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6789                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6790                 </links>
6791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6792             <actions>
6793                 <create permission="TRANSIT_COPY">
6794                     <context link="target_copy" field="owner"/>
6795                 </create>
6796                 <retrieve/>
6797                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6798                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6799             </actions>
6800         </permacrud>
6801         </class>
6802         <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">
6803                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6804                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6805                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6806                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6807                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6808                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6809                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6810                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6811                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6812                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6813                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6814                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6815                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6816                 </fields>
6817                 <links>
6818                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6819                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6820                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6821                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6822                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6823                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6824                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6825                 </links>
6826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6827             <actions>
6828                 <create permission="TRANSIT_COPY" context_field="owner">
6829                     <context link="target_copy" field="circ_lib"/>
6830                 </create>
6831                 <retrieve/>
6832                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6833                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6834             </actions>
6835         </permacrud>
6836         </class>
6837         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6838                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6839                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6840                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6841                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6842                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6843                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6844                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6845                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6846                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6847                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6848                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6849                 </fields>
6850                 <links>
6851                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6852                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6853                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6854                 </links>
6855         </class>
6856         <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">
6857                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6858                         <field name="grp" />
6859                         <field name="id" reporter:datatype="id" />
6860                         <field name="usr" />
6861                 </fields>
6862                 <links>
6863                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6864                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6865                 </links>
6866         </class>
6867         <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">
6868                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6869                         <field name="id" reporter:datatype="id" />
6870                         <field name="fq_field" reporter:datatype="text"/>
6871                         <field name="identity_value" reporter:datatype="text"/>
6872                         <field name="translation" reporter:datatype="text"/>
6873                         <field name="string" reporter:datatype="text"/>
6874                 </fields>
6875                 <links>
6876                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6877                 </links>
6878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6879             <actions>
6880                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6881                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6882                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6883                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6884             </actions>
6885         </permacrud>
6886         </class>
6887         <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">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6889                         <field name="id" reporter:datatype="id" />
6890                         <field name="fm_class" reporter:datatype="text"/>
6891                         <field name="field" reporter:datatype="text"/>
6892                         <field name="owner" reporter:datatype="org_unit"/>
6893                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6894                 </fields>
6895                 <links>
6896                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6897                 </links>
6898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6899             <actions>
6900                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6901                 <retrieve/>
6902                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6903                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6904             </actions>
6905         </permacrud>
6906         </class>
6907         <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">
6908                 <fields oils_persist:primary="code">
6909                         <field name="code" reporter:datatype="id" />
6910                         <field name="marc_code" reporter:datatype="text"/>
6911                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6912                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6913                 </fields>
6914                 <links/>
6915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6916             <actions>
6917                 <create permission="CREATE_LOCALE" global_required="true"/>
6918                 <retrieve/>
6919                 <update permission="UPDATE_LOCALE" global_required="true"/>
6920                 <delete permission="DELETE_LOCALE" global_required="true"/>
6921             </actions>
6922         </permacrud>
6923         </class>
6924         <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">
6925                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6926                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6927                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6928                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6929             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6930                 </fields>
6931                 <links>
6932                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6933                 </links>
6934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6935             <actions>
6936                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6937                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6938                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6939                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6940             </actions>
6941         </permacrud>
6942         </class>
6943
6944         <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">
6945                 <fields oils_persist:primary="id">
6946                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6947                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6948                 </fields>
6949                 <links/>
6950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6951             <actions>
6952                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6953                 <retrieve/>
6954                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6955                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6956             </actions>
6957         </permacrud>
6958         </class>
6959
6960         <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">
6961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6962                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6963                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6964                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6965                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6966                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6967                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6968                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6969                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6970                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6971                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6972                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6973                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6974                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6975                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6976                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6977                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6978                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6979                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6980                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6981                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6982                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6983                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6984                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6985                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6986                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6987                 </fields>
6988                 <links>
6989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6990                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6991                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6992                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6993                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6994                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6995                 </links>
6996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6997             <actions>
6998                 <create permission="user_request.create">
6999                     <context link="usr" field="home_ou"/>
7000                                 </create>
7001                 <retrieve permission="user_request.view">
7002                     <context link="usr" field="home_ou"/>
7003                                 </retrieve>
7004                 <update permission="user_request.update">
7005                     <context link="usr" field="home_ou"/>
7006                                 </update>
7007                 <delete permission="user_request.delete">
7008                     <context link="usr" field="home_ou"/>
7009                                 </delete>
7010             </actions>
7011         </permacrud>
7012         </class>
7013
7014         <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">
7015                 <fields oils_persist:primary="code">
7016                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7017                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7018                 </fields>
7019                 <links/>
7020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7021             <actions>
7022                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7023                 <retrieve/>
7024                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7025                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7026             </actions>
7027         </permacrud>
7028         </class>
7029
7030         <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">
7031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7032                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7033                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7034                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7035                         <field reporter:label="Ratio" name="ratio" />
7036                 </fields>
7037                 <links>
7038                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7039                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7040                 </links>
7041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042                         <actions>
7043                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7044                                 <retrieve/>
7045                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7046                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7047                         </actions>
7048                 </permacrud>
7049         </class>
7050
7051         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7052                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7053                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7054                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7055                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7056                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7057                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7058                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7059                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7060                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7061                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7062                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7063                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7064                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7065                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7066                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7067                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7068                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7069                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7070                 </fields>
7071                 <links>
7072                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7073                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7074             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7075             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7076             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7077                 </links>
7078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7079             <actions>
7080                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7081                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7082                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7083                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7084             </actions>
7085         </permacrud>
7086         </class>
7087
7088         <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">
7089                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7090                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7091                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7092                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7093                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7094                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7095                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7096                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7097                 </fields>
7098                 <links>
7099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7100                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7101                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7102                 </links>
7103         </class>
7104
7105         <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">
7106                 <fields oils_persist:primary="code">
7107                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7108                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7109                 </fields>
7110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7111             <actions>
7112                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7113                 <retrieve/>
7114                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7115                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7116             </actions>
7117                 </permacrud>
7118         </class>
7119
7120         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7122                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7123                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7124                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7125                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7126                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7127                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7128                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7129                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7130                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7131                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7132                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7133                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7134                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7135                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7136                 </fields>
7137                 <links>
7138                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7139                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7140                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7141                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7142                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7143                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7144                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7145                 </links>
7146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7147             <actions>
7148                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7149                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7150                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7151                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7152             </actions>
7153         </permacrud>
7154         </class>
7155
7156         <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">
7157                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7158                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7159                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7160                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7161                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7162                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7163                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7164                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7165                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7166                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7167                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7168                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7169                 </fields>
7170                 <links>
7171                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7172                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7173                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7174                 </links>
7175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7176             <actions>
7177                 <create   permission="ADMIN_INVOICE">
7178                                         <context link="invoice" field="receiver"/>
7179                                 </create>
7180                 <retrieve permission="ADMIN_INVOICE">
7181                                         <context link="invoice" field="receiver"/>
7182                                 </retrieve>
7183                 <update   permission="ADMIN_INVOICE">
7184                                         <context link="invoice" field="receiver"/>
7185                                 </update>
7186                                 <delete   permission="ADMIN_INVOICE">
7187                                         <context link="invoice" field="receiver"/>
7188                                 </delete>
7189             </actions>
7190         </permacrud>
7191         </class>
7192
7193         <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">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7195                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7196                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7197                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7198                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7199                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7200                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7201                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7202                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7203                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7204                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7205                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7206                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7207                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7208                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7209                 </fields>
7210                 <links>
7211                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7212                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7213                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7214                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7215                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7216                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7217                 </links>
7218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7219             <actions>
7220                 <create   permission="ADMIN_INVOICE">
7221                                         <context link="invoice" field="receiver"/>
7222                                 </create>
7223                 <retrieve permission="ADMIN_INVOICE">
7224                                         <context link="invoice" field="receiver"/>
7225                                 </retrieve>
7226                 <update   permission="ADMIN_INVOICE">
7227                                         <context link="invoice" field="receiver"/>
7228                                 </update>
7229                                 <delete   permission="ADMIN_INVOICE">
7230                                         <context link="invoice" field="receiver"/>
7231                                 </delete>
7232             </actions>
7233         </permacrud>
7234         </class>
7235
7236         <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">
7237                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7238                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7239                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7240                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7241                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7242                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7243                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7244                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7245                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7246                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7247                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7248                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7249                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7250                 </fields>
7251                 <links>
7252                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7253                 </links>
7254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7255             <actions>
7256                 <create permission="ADMIN_PROVIDER">
7257                     <context link="provider" field="owner"/>
7258                 </create>
7259                 <retrieve permission="ADMIN_PROVIDER">
7260                     <context link="provider" field="owner"/>
7261                 </retrieve>
7262                 <update permission="ADMIN_PROVIDER">
7263                     <context link="provider" field="owner"/>
7264                 </update>
7265                 <delete permission="ADMIN_PROVIDER">
7266                     <context link="provider" field="owner"/>
7267                 </delete>
7268             </actions>
7269         </permacrud>
7270         </class>
7271
7272         <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">
7273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7274                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7275                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7276                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7277                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7278                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7279                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7280         </fields>
7281                 <links>
7282                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7283                 </links>
7284         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7285             <actions>
7286                 <create permission="ADMIN_PROVIDER">
7287                     <context link="provider" field="owner"/>
7288                 </create>
7289                 <retrieve permission="ADMIN_PROVIDER">
7290                     <context link="provider" field="owner"/>
7291                 </retrieve>
7292                 <update permission="ADMIN_PROVIDER">
7293                     <context link="provider" field="owner"/>
7294                 </update>
7295                 <delete permission="ADMIN_PROVIDER">
7296                     <context link="provider" field="owner"/>
7297                 </delete>
7298             </actions>
7299         </permacrud>
7300     </class>
7301         <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">
7302                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7303                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7304                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7305                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7306                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7307                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7308                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7309                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7310                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7311                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7312                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7313                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7314                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7315                 </fields>
7316                 <links>
7317                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7318                 </links>
7319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7320             <actions>
7321                 <create permission="ADMIN_PROVIDER">
7322                     <context link="contact" jump='provider' field="owner"/>
7323                 </create>
7324                 <retrieve permission="ADMIN_PROVIDER">
7325                     <context link="contact" jump='provider' field="owner"/>
7326                 </retrieve>
7327                 <update permission="ADMIN_PROVIDER">
7328                     <context link="contact" jump='provider' field="owner"/>
7329                 </update>
7330                 <delete permission="ADMIN_PROVIDER">
7331                     <context link="contact" jump='provider' field="owner"/>
7332                 </delete>
7333             </actions>
7334         </permacrud>
7335         </class>
7336
7337         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7338                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7339                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7340                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7341                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7342                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7343                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7344                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7345                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7346                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7347                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7348                 </fields>
7349                 <links>
7350                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7351                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7352                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7353                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7354                 </links>
7355         </class>
7356
7357         <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">
7358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7359                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7360                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7361                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7362                 </fields>
7363                 <links>
7364             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7365                 </links>
7366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7367                         <actions>
7368                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7369                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7370                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7371                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7372                         </actions>
7373                 </permacrud>
7374         </class>
7375
7376         <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">
7377                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7378                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7379                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7380                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7381                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7382                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7383                 </fields>
7384                 <links>
7385                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7386                 </links>
7387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7388                         <actions>
7389                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7390                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7391                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7392                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7393                         </actions>
7394                 </permacrud>
7395         </class>
7396
7397         <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">
7398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7399                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7400                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7401                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7402                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7403                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7404                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7405                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7406                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7407                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7408                 </fields>
7409                 <links>
7410                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7412             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7413             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7414                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7415                 </links>
7416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7417             <actions>
7418                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7419                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7420                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7421                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7422             </actions>
7423         </permacrud>
7424         </class>
7425
7426         <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">
7427                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7428                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7429                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7430                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7431                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7432                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7433                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7434                 </fields>
7435                 <links>
7436                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7437                 </links>
7438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7439                         <actions>
7440                                 <create permission="ADMIN_FUNDING_SOURCE">
7441                     <context link="funding_source" field="owner"/>
7442                 </create>
7443                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7444                     <context link="funding_source" field="owner"/>
7445                 </retrieve>
7446                                 <update permission="ADMIN_FUNDING_SOURCE">
7447                     <context link="funding_source" field="owner"/>
7448                 </update>
7449                                 <delete permission="ADMIN_FUNDING_SOURCE">
7450                     <context link="funding_source" field="owner"/>
7451                 </delete>
7452                         </actions>
7453                 </permacrud>
7454         </class>
7455
7456         <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">
7457                 <fields oils_persist:primary="id">
7458                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7459                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7460                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7461                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7462                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7463                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7464                 </fields>
7465                 <links>
7466                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7467                 </links>
7468         </class>
7469
7470         <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">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7472                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7473                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7474                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7475                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7476                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7477                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7478                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7479                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7480                 </fields>
7481                 <links>
7482                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7483                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7484                 </links>
7485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7486                         <actions>
7487                                 <create permission="ADMIN_ACQ_FUND">
7488                     <context link="fund" field="org"/>
7489                 </create>
7490                                 <retrieve permission="ADMIN_ACQ_FUND">
7491                     <context link="fund" field="org"/>
7492                 </retrieve>
7493                                 <update permission="ADMIN_ACQ_FUND">
7494                     <context link="fund" field="org"/>
7495                 </update>
7496                                 <delete permission="ADMIN_ACQ_FUND">
7497                     <context link="fund" field="org"/>
7498                 </delete>
7499                         </actions>
7500                 </permacrud>
7501         </class>
7502
7503         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7504                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7505                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7506                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7507                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7508                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7509                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7510                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7511                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7512                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7513                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7514                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7515                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7516                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7517                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7518                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7519                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7520                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7521                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7522                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7523                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7524                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7525                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7526                 </fields>
7527                 <links>
7528                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7529                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7530             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7531             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7532             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7533             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7534             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7535             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7536             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7537             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7538             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7539                 </links>
7540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7541             <actions>
7542                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7543                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7544                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7545                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7546             </actions>
7547         </permacrud>
7548         </class>
7549
7550         <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">
7551                 <fields oils_persist:primary="fund">
7552                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7553                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7554                 </fields>
7555                 <links>
7556                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7557                 </links>
7558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7559             <actions>
7560                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7561                                         <context link="fund" field="org" />
7562                 </retrieve>
7563             </actions>
7564         </permacrud>
7565         </class>
7566
7567         <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">
7568                 <fields oils_persist:primary="fund">
7569                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7570                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7571                 </fields>
7572                 <links>
7573                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7574                 </links>
7575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7576             <actions>
7577                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7578                                         <context link="fund" field="org" />
7579                 </retrieve>
7580             </actions>
7581         </permacrud>
7582         </class>
7583
7584         <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">
7585                 <fields oils_persist:primary="fund">
7586                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7587                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7588                 </fields>
7589                 <links>
7590                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7591                 </links>
7592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7593             <actions>
7594                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7595                                         <context link="fund" field="org" />
7596                 </retrieve>
7597             </actions>
7598         </permacrud>
7599         </class>
7600
7601         <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">
7602                 <fields oils_persist:primary="fund">
7603                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7604                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7605                 </fields>
7606                 <links>
7607                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7608                 </links>
7609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7610             <actions>
7611                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7612                                         <context link="fund" field="org" />
7613                 </retrieve>
7614             </actions>
7615         </permacrud>
7616         </class>
7617
7618         <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">
7619                 <fields oils_persist:primary="fund">
7620                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7621                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7622                 </fields>
7623                 <links>
7624                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7625                 </links>
7626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7627             <actions>
7628                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7629                                         <context link="fund" field="org" />
7630                 </retrieve>
7631             </actions>
7632         </permacrud>
7633         </class>
7634
7635    <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">
7636         <fields oils_persist:primary="fund">
7637             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7638             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7639         </fields>
7640         <links>
7641             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7642         </links>
7643     </class>
7644
7645    <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">
7646         <fields oils_persist:primary="fund">
7647             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7648             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7649         </fields>
7650         <links>
7651             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7652         </links>
7653     </class>
7654
7655    <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">
7656         <fields oils_persist:primary="fund">
7657             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7658             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7659         </fields>
7660         <links>
7661             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7662         </links>
7663     </class>
7664
7665    <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">
7666         <fields oils_persist:primary="fund">
7667             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7668             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7669         </fields>
7670         <links>
7671             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7672         </links>
7673     </class>
7674
7675    <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">
7676         <fields oils_persist:primary="fund">
7677             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7678             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7679         </fields>
7680         <links>
7681             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7682         </links>
7683     </class>
7684
7685         <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">
7686                 <fields oils_persist:primary="funding_source">
7687                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7688                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7689                 </fields>
7690                 <links>
7691                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7692                 </links>
7693         </class>
7694
7695         <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">
7696                 <fields oils_persist:primary="funding_source">
7697                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7698                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7699                 </fields>
7700                 <links>
7701                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7702                 </links>
7703         </class>
7704
7705         <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">
7706                 <fields oils_persist:primary="funding_source">
7707                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7708                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7709                 </fields>
7710                 <links>
7711                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7712                 </links>
7713         </class>
7714
7715         <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">
7716                 <fields oils_persist:primary="fund">
7717                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7718                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7719                 </fields>
7720                 <links>
7721                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7722                 </links>
7723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7724             <actions>
7725                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7726                                         <context link="fund" field="org" />
7727                 </retrieve>
7728             </actions>
7729         </permacrud>
7730     </class>
7731     <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">
7732         <oils_persist:source_definition><![CDATA[
7733             SELECT
7734                 acqf.*,
7735                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7736                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7737                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7738                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7739             FROM
7740                 acq.fund acqf
7741                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7742                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7743                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7744                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7745         ]]></oils_persist:source_definition>
7746         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7747             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7748             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7749             <field reporter:label="Name" name="name" reporter:datatype="text" />
7750             <field reporter:label="Year" name="year" reporter:datatype="int" />
7751             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7752             <field reporter:label="Code" name="code" reporter:datatype="text" />
7753             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7754             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7755             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7756             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7757             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7758
7759             <!-- non fund-native fields -->
7760             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7761             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7762             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7763             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7764         </fields>
7765         <links>
7766             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7767             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7768             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7769         </links>
7770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7771             <actions>
7772                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7773             </actions>
7774         </permacrud>
7775         </class>
7776         <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">
7777                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7778                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7779                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7780                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7781                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7782                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7783                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7784                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7785                 </fields>
7786                 <links>
7787                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7788                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7789                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7790                 </links>
7791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7792                         <actions>
7793                                 <create permission="ADMIN_ACQ_FUND">
7794                     <context link="fund" field="org"/>
7795                 </create>
7796                                 <retrieve permission="ADMIN_ACQ_FUND">
7797                     <context link="fund" field="org"/>
7798                 </retrieve>
7799                                 <update permission="ADMIN_ACQ_FUND">
7800                     <context link="fund" field="org"/>
7801                 </update>
7802                                 <delete permission="ADMIN_ACQ_FUND">
7803                     <context link="fund" field="org"/>
7804                 </delete>
7805                         </actions>
7806                 </permacrud>
7807         </class>
7808
7809     <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">
7810         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7811             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7812             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7813             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7814             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7815             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7816             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7817             <field reporter:label="Note" name="note" reporter:datatype="text" />
7818             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7819         </fields>
7820         <links>
7821             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7822             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7823             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7824         </links>
7825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7826                         <actions>
7827                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7828                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7829                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7830                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7831                         </actions>
7832                 </permacrud>
7833     </class>
7834
7835         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7837                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7838                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7839                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7840                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7841                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7842                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7843                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7844                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7845                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7846                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7847                 </fields>
7848                 <links>
7849                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7850                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7851                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7852                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7853                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7854                 </links>
7855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7856                         <actions>
7857                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7858                         </actions>
7859                 </permacrud>
7860         </class>
7861
7862         <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">
7863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7864                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7865                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7866                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7867                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7868                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7869                 </fields>
7870                 <links>
7871                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7872                 </links>
7873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7874                         <actions>
7875                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7876                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7877                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7878                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7879                         </actions>
7880                 </permacrud>
7881         </class>
7882
7883         <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">
7884                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7885                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7886                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7887                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7888                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7889                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7890                         <field reporter:label="State" name="state" reporter:datatype="text" />
7891                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7892                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7893                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7894                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7895                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7896                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7897                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7898                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7899                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7900                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7901                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7902                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7903                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7904                 </fields>
7905                 <links>
7906                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7907                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7908                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7909                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7910                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7911                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7912                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7913                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7914                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7915                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7916                 </links>
7917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7918                         <actions>
7919                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7920                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7921                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7922                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7923                         </actions>
7924                 </permacrud>
7925         </class>
7926
7927         <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">
7928                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7929                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7930                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7931                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7932                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7933                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7934                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7935                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7936                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7937                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7938                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7939                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7940                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7941                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7942                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7943                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7944                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7945                 </fields>
7946                 <links>
7947                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7948                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7949                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7950                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7951                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7952                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7953                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7954                 </links>
7955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7956             <actions>
7957                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7958             </actions>
7959                 </permacrud>
7960         </class>
7961
7962         <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">
7963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7964                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7965                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7966                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7967                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7968                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7969                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7970                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7971                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7972                 </fields>
7973                 <links>
7974                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7975                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7976                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7977                 </links>
7978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7979             <actions>
7980                 <create permission="CREATE_PURCHASE_ORDER">
7981                     <context link="purchase_order" field="ordering_agency"/>
7982                 </create>
7983                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7984                     <context link="purchase_order" field="ordering_agency"/>
7985                 </retrieve>
7986                 <update permission="CREATE_PURCHASE_ORDER">
7987                     <context link="purchase_order" field="ordering_agency"/>
7988                 </update>
7989                 <delete permission="CREATE_PURCHASE_ORDER">
7990                     <context link="purchase_order" field="ordering_agency"/>
7991                 </delete>
7992             </actions>
7993                 </permacrud>
7994         </class>
7995
7996         <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">
7997                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7998                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7999                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8000                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8001                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8002                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8003                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8004                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8005                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8006                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8007                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8008                 </fields>
8009                 <links>
8010                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8011                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8012                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8013                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8014                 </links>
8015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8016             <actions>
8017                 <create permission="CREATE_PURCHASE_ORDER">
8018                     <context link="purchase_order" field="ordering_agency"/>
8019                 </create>
8020                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8021                     <context link="purchase_order" field="ordering_agency"/>
8022                 </retrieve>
8023                 <update permission="CREATE_PURCHASE_ORDER">
8024                     <context link="purchase_order" field="ordering_agency"/>
8025                 </update>
8026                 <delete permission="CREATE_PURCHASE_ORDER">
8027                     <context link="purchase_order" field="ordering_agency"/>
8028                 </delete>
8029             </actions>
8030                 </permacrud>
8031         </class>
8032
8033         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8035                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8036                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8037                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8038                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8039                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8040                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8041                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8042                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8043                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8044                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8045                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8046                         <field reporter:label="State" name="state" reporter:datatype="text" />
8047                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8048                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8049                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8050                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8051                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8052                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8053                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8054                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8055                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8056                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8057                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8058                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8059                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8060                 </fields>
8061                 <links>
8062                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8063                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8064                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8065                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8066                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8067                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8068                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8069                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8070                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8071                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8072                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8073                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8074                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8075                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8076                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8077                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8078                 </links>
8079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8080                         <actions>
8081                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8082                                         <context link="purchase_order" field="ordering_agency"/>
8083                                         <context link="picklist" field="org_unit"/>
8084                                 </retrieve>
8085                         </actions>
8086                 </permacrud>
8087         </class>
8088
8089         <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">
8090                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8091                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8092                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8093                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8094                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8095                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8096                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8097                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8098                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8099                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8100                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8101                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8102                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8103                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8104                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8105                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8106                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8107                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8108                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8109                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8110                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8111                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8112                 </fields>
8113                 <links>
8114                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8115                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8116                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8117                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8118                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8119                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8120                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8121                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8122                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8123                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8124                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8125                 </links>
8126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8127                         <actions>
8128                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8129                                         <context link="purchase_order" field="ordering_agency"/>
8130                                         <context link="picklist" field="org_unit"/>
8131                                 </retrieve>
8132                         </actions>
8133                 </permacrud>
8134         </class>
8135
8136         <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">
8137                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8138                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8139                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8140                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8141                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8142                 </fields>
8143                 <links>
8144                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8145                 </links>
8146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8147                         <actions>
8148                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8149                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8150                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8151                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8152                         </actions>
8153                 </permacrud>
8154         </class>
8155
8156         <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">
8157                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8158                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8159                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8160                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8161                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8162                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8163                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8164                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8165                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8166                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8167                 </fields>
8168                 <links>
8169                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8170                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8171                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8172                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8173                 </links>
8174         </class>
8175
8176         <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">
8177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8178                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8179                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8180                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8181                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8182                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8183                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8184                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8185                 </fields>
8186                 <links>
8187                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8188                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8189                 </links>
8190         </class>
8191
8192         <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">
8193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8194                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8195                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8196                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8197                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8198                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8199                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8200                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8201                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8202                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8203                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8204                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8205                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8206                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8207                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8208                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8209                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8210                 </fields>
8211                 <links>
8212                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8213                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8214                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8215                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8216                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8217                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8218                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8219                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8220                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8221                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8222                 </links>
8223         </class>
8224
8225         <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">
8226                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8227                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8228                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8229                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8230                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8231                 </fields>
8232                 <links/>
8233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8234                         <actions>
8235                                 <retrieve />
8236                         </actions>
8237                 </permacrud>
8238         </class>
8239
8240         <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">
8241                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8242                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8243                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8244                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8245                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8246                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8247             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8248                 </fields>
8249                 <links/>
8250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8251             <actions>
8252                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8253                 <retrieve />
8254                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8255                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8256             </actions>
8257         </permacrud>
8258         </class>
8259
8260         <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">
8261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8262                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8263                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8264                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8265                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8266                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8267                 </fields>
8268                 <links/>
8269         </class>
8270         <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">
8271                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8272                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8273                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8274                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8275                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8276                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8277                 </fields>
8278                 <links>
8279                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8280                 </links>
8281         </class>
8282
8283         <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">
8284             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8285                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8286                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8287                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8288                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8289                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8290                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8291         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8292
8293             </fields>
8294             <links>
8295                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8296             </links>
8297             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8298                 <actions>
8299                     <create permission="ADMIN_PROVIDER">
8300                         <context link="provider" field="owner"/>
8301                     </create>
8302                     <retrieve permission="ADMIN_PROVIDER">
8303                         <context link="provider" field="owner"/>
8304                     </retrieve>
8305                     <update permission="ADMIN_PROVIDER">
8306                         <context link="provider" field="owner"/>
8307                     </update>
8308                     <delete permission="ADMIN_PROVIDER">
8309                         <context link="provider" field="owner"/>
8310                     </delete>
8311                 </actions>
8312             </permacrud>
8313         </class>
8314         
8315         <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">
8316             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8317                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8318                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8319                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8320                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8321             </fields>
8322             <links>
8323                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8324             </links>
8325             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8326                 <actions>
8327                     <create permission="ADMIN_PROVIDER">
8328                         <context link="provider" field="owner"/>
8329                     </create>
8330                     <retrieve permission="ADMIN_PROVIDER">
8331                         <context link="provider" field="owner"/>
8332                     </retrieve>
8333                     <update permission="ADMIN_PROVIDER">
8334                         <context link="provider" field="owner"/>
8335                     </update>
8336                     <delete permission="ADMIN_PROVIDER">
8337                         <context link="provider" field="owner"/>
8338                     </delete>
8339                 </actions>
8340             </permacrud>
8341         </class>
8342         
8343         <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">
8344             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8345                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8346                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8348                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8349                 </fields>
8350                 <links/>
8351         </class>
8352
8353         <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">
8354                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8355                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8356                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8357                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8358                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8359                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8360                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8361                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8362                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8363                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8364                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8365                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8366                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8367                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8368                 </fields>
8369                 <links>
8370                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8371                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8372                 </links>
8373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8374             <actions>
8375                 <create permission="ADMIN_PROVIDER">
8376                     <context link="provider" field="owner"/>
8377                 </create>
8378                 <retrieve permission="ADMIN_PROVIDER">
8379                     <context link="provider" field="owner"/>
8380                 </retrieve>
8381                 <update permission="ADMIN_PROVIDER">
8382                     <context link="provider" field="owner"/>
8383                 </update>
8384                 <delete permission="ADMIN_PROVIDER">
8385                     <context link="provider" field="owner"/>
8386                 </delete>
8387             </actions>
8388         </permacrud>
8389         </class>
8390
8391         <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">
8392                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8393                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8394                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8395                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8396                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8397                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8398                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8399                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8400                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8401                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8402                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8403                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8404                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8405                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8406                 </fields>
8407                 <links>
8408                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8409                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8410                 </links>
8411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8412             <actions>
8413                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8414                     <context link="account" jump="provider" field="owner"/>
8415                 </retrieve>
8416                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8417                     <context link="account" jump="provider" field="owner"/>
8418                 </update>
8419                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8420                     <context link="account" jump="provider" field="owner"/>
8421                 </delete>
8422             </actions>
8423         </permacrud>
8424         </class>
8425
8426
8427         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8428                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8429                         <field name="id" reporter:datatype="id" />
8430                         <field name="parent" reporter:datatype="link"/>
8431                         <field name="owner" reporter:datatype="link"/>
8432                         <field name="create_time" reporter:datatype="timestamp"/>
8433                         <field name="name" reporter:datatype="text"/>
8434                         <field name="shared" reporter:datatype="bool"/>
8435                         <field name="share_with" reporter:datatype="link"/>
8436                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8437                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8438                 </fields>
8439                 <links>
8440                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8441                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8442                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8443                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8444                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8445                 </links>
8446         </class>
8447         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8448                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8449                         <field name="id" reporter:datatype="id" />
8450                         <field name="parent" reporter:datatype="link"/>
8451                         <field name="owner" reporter:datatype="link"/>
8452                         <field name="create_time" reporter:datatype="timestamp"/>
8453                         <field name="name" reporter:datatype="text"/>
8454                         <field name="shared" reporter:datatype="bool"/>
8455                         <field name="share_with" reporter:datatype="link"/>
8456                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8457                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8458                 </fields>
8459                 <links>
8460                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8461                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8462                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8463                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8464                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8465                 </links>
8466         </class>
8467         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8468                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8469                         <field name="id" reporter:datatype="id" />
8470                         <field name="parent" reporter:datatype="link"/>
8471                         <field name="owner" reporter:datatype="link"/>
8472                         <field name="create_time" reporter:datatype="timestamp"/>
8473                         <field name="name" reporter:datatype="text"/>
8474                         <field name="shared" reporter:datatype="bool"/>
8475                         <field name="share_with" reporter:datatype="link"/>
8476                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8477                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8478                 </fields>
8479                 <links>
8480                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8481                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8482                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8483                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8484                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8485                 </links>
8486         </class>
8487         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8488                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8489                         <field name="id" reporter:datatype="id" />
8490                         <field name="owner" reporter:datatype="link"/>
8491                         <field name="create_time" reporter:datatype="timestamp"/>
8492                         <field name="name" reporter:datatype="text"/>
8493                         <field name="data" reporter:datatype="text"/>
8494                         <field name="folder" reporter:datatype="link"/>
8495                         <field name="description" reporter:datatype="text"/>
8496                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8497                 </fields>
8498                 <links>
8499                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8500                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8501                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8502                 </links>
8503         </class>
8504         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8505                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8506                         <field name="id" reporter:datatype="id" />
8507                         <field name="owner" reporter:datatype="link"/>
8508                         <field name="create_time" reporter:datatype="timestamp"/>
8509                         <field name="template" reporter:datatype="link"/>
8510                         <field name="data" reporter:datatype="text"/>
8511                         <field name="folder" reporter:datatype="link"/>
8512                         <field name="recur" reporter:datatype="bool"/>
8513                         <field name="recurrence" reporter:datatype="interval"/>
8514                         <field name="name" reporter:datatype="text"/>
8515                         <field name="description" reporter:datatype="text"/>
8516                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8517                 </fields>
8518                 <links>
8519                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8520                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8521                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8522                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8523                 </links>
8524         </class>
8525         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8526                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8527                         <field name="id" reporter:datatype="id" />
8528                         <field name="runner" reporter:datatype="link"/>
8529                         <field name="start_time" reporter:datatype="timestamp"/>
8530                         <field name="complete_time" reporter:datatype="timestamp"/>
8531                         <field name="run_time" reporter:datatype="timestamp"/>
8532                         <field name="email" reporter:datatype="text"/>
8533                         <field name="excel_format" reporter:datatype="bool"/>
8534                         <field name="csv_format" reporter:datatype="bool"/>
8535                         <field name="html_format" reporter:datatype="bool"/>
8536                         <field name="error_code" reporter:datatype="int"/>
8537                         <field name="error_text" reporter:datatype="text"/>
8538                         <field name="report" reporter:datatype="link"/>
8539                         <field name="folder" reporter:datatype="link"/>
8540                         <field name="chart_pie" reporter:datatype="bool"/>
8541                         <field name="chart_bar" reporter:datatype="bool"/>
8542                         <field name="chart_line" reporter:datatype="bool"/>
8543                 </fields>
8544                 <links>
8545                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8546                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8547                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8548                 </links>
8549         </class>
8550         <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">
8551                 <fields oils_persist:primary="id">
8552                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8553                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8554                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8555                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8556                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8557                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8558                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8559                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8560                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8561                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8562                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8563                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8564                 </fields>
8565                 <links>
8566                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8567                 </links>
8568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8569                         <actions>
8570                                 <retrieve />
8571                         </actions>
8572                 </permacrud>
8573         </class>
8574         <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">
8575                 <fields oils_persist:primary="id">
8576                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8577                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8578                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8579                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8580                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8581                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8582                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8583                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8584                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8585                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8586                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8587                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8588                 </fields>
8589                 <links>
8590                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8591                 </links>
8592         </class>
8593         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8594                 <fields oils_persist:primary="id">
8595                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8596                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8597                         <field reporter:label="Fingerprint" name="fingerprint" />
8598                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8599                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8600                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8601                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8602                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8603                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8604                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8605                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8606                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8607                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8608                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8609                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8610                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8611                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8612                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8613                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8614                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8615                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8616                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8617                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8618                 </fields>
8619                 <links>
8620                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8621                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8622                 </links>
8623         </class>
8624         <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">
8625                 <fields oils_persist:primary="id">
8626                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8627                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8628                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8629                 </fields>
8630                 <links>
8631                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8632                 </links>
8633         </class>
8634         <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">
8635                 <fields oils_persist:primary="id">
8636                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8637                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8638                 </fields>
8639                 <links>
8640                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8641                 </links>
8642         </class>
8643         <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">
8644                 <fields oils_persist:primary="id">
8645                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8646                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8647                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8648                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8649                 </fields>
8650                 <links>
8651                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8652                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8653                 </links>
8654         </class>
8655         <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">
8656                 <fields oils_persist:primary="xact">
8657                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8658                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8659                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8660                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8661                 </fields>
8662                 <links>
8663                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8664                 </links>
8665         </class>
8666         <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">
8667                 <fields oils_persist:primary="xact">
8668                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8669                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8670                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8671                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8672                 </fields>
8673                 <links>
8674                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8675                 </links>
8676         </class>
8677         <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)">
8678                 <fields oils_persist:primary="id">
8679                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8680                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8681                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8682                 </fields>
8683                 <links>
8684                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8685                 </links>
8686         </class>
8687         <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">
8688                 <fields oils_persist:primary="id">
8689                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8690                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8691                 </fields>
8692                 <links>
8693                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8694                 </links>
8695         </class>
8696         <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">
8697                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8698                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8699                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8700                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8701                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8702                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8703                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8704                 </fields>
8705                 <links>
8706                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8707                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8708                 </links>
8709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8710                         <actions>
8711                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8712                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8713                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8714                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8715                         </actions>
8716                 </permacrud>
8717         </class>
8718         <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">
8719                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8720                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8721                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8722                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8723                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8724                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8725                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8726                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8727                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8728                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8729                 </fields>
8730                 <links>
8731                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8732                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8733                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8734                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8735                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8736                 </links>
8737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8738                         <actions>
8739                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8740                                         <context link="formula" field="owner"/>
8741                                 </create>
8742                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8743                                         <context link="formula" field="owner"/>
8744                                 </retrieve>
8745                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8746                                         <context link="formula" field="owner"/>
8747                                 </update>
8748                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8749                                         <context link="formula" field="owner"/>
8750                                 </delete>
8751                         </actions>
8752                 </permacrud>
8753         </class>
8754
8755         <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">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8757                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8758                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8759                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8760                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8761                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8762                 </fields>
8763                 <links>
8764                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8765                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8766                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8767                 </links>
8768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8769                         <actions>
8770                                 <create permission="CREATE_PURCHASE_ORDER">
8771                                         <context link="formula" field="owner"/>
8772                 </create>
8773                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8774                                         <context link="formula" field="owner"/>
8775                 </retrieve>
8776                                 <update permission="CREATE_PURCHASE_ORDER">
8777                                         <context link="formula" field="owner"/>
8778                 </update>
8779                                 <delete permission="CREATE_PURCHASE_ORDER">
8780                                         <context link="formula" field="owner"/>
8781                 </delete>
8782                         </actions>
8783                 </permacrud>
8784         </class>
8785
8786         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8787                 <fields oils_persist:primary="id">
8788                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8789                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8790                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8791                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8792                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8793                 </fields>
8794                 <links>
8795                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8796                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8797                 </links>
8798         </class>
8799
8800         <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">
8801                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8802                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8803                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8804                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8805                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8806                 </fields>
8807                 <links>
8808                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8809                 </links>
8810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8811                         <actions>
8812                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8813                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8814                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8815                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8816                         </actions>
8817                 </permacrud>
8818         </class>
8819
8820         <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">
8821                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8822                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8823                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8824                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8825                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8826                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8827                 </fields>
8828                 <links>
8829                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8830                 </links>
8831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8832                         <actions>
8833                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8834                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8835                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8836                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8837                         </actions>
8838                 </permacrud>
8839         </class>
8840
8841         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8842                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8843                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8844                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8845                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8846                 </fields>
8847                 <links>
8848                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8849                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8850                 </links>
8851         </class>
8852
8853         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8854                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8855                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8856                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8857                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8858                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8859                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8860                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8861                 </fields>
8862                 <links>
8863                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8864                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8865                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8866                 </links>
8867         </class>
8868
8869         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8870                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8871                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8872                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8873                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8874                 </fields>
8875                 <links>
8876                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8877                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8878                 </links>
8879         </class>
8880
8881         <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">
8882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8883                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8884                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8885                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8886                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8887                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8888                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8889                 </fields>
8890                 <links>
8891                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8892                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8893                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8894                 </links>
8895         </class>
8896
8897         <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">
8898                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8899                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8900                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8901                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8902                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8903                 </fields>
8904                 <links>
8905                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8906                 </links>
8907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8908             <actions>
8909                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8910                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8911                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8912                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8913             </actions>
8914                 </permacrud>
8915         </class>
8916
8917         <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">
8918                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8919                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8920                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8921                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8922                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8923                 </fields>
8924                 <links>
8925                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8926                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8927                 </links>
8928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8929                         <actions>
8930                                 <create permission="ADMIN_CLAIM_POLICY">
8931                                         <context link="claim_policy" field="org_unit"/>
8932                 </create>
8933                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8934                                         <context link="claim_policy" field="org_unit"/>
8935                 </retrieve>
8936                                 <update permission="ADMIN_CLAIM_POLICY">
8937                                         <context link="claim_policy" field="org_unit"/>
8938                 </update>
8939                                 <delete permission="ADMIN_CLAIM_POLICY">
8940                                         <context link="claim_policy" field="org_unit"/>
8941                 </delete>
8942                         </actions>
8943                 </permacrud>
8944         </class>
8945
8946     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8947         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
8948             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8949             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
8950             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8951             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8952             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8953             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8954             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8955             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8956             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8957             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8958             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8959             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8960             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8961             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8962             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8963             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
8964         </fields>
8965         <links>
8966             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
8967         </links>
8968     </class>
8969
8970     <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">
8971         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8972             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8973             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8974             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8975             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8976             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8977         </fields>
8978     </class>
8979
8980     <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">
8981         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8982             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8983             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8984             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8985             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8986             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8987             <field reporter:label="City" name="city" reporter:datatype="text"/>
8988             <field reporter:label="County" name="county"  reporter:datatype="text"/>
8989             <field reporter:label="State" name="state" reporter:datatype="text"/>
8990             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8991             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8992             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8993         </fields>
8994     </class>
8995
8996     <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">
8997         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8998             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8999             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9000             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9001             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9002             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9003             <field reporter:label="City" name="city" reporter:datatype="text"/>
9004             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9005             <field reporter:label="State" name="state" reporter:datatype="text"/>
9006             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9007             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9008             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9009         </fields>
9010     </class>
9011
9012     <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">
9013         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9014             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9015             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9016             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9017             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9018             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9019             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9020         </fields>
9021     </class>
9022
9023         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9024                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9025                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9026                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9027                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9028                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9029                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9030                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9031                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9032                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9033                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9034                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9035                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9036                 </fields>
9037                 <links>
9038                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9039                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9040                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9041                 </links>
9042         </class>
9043
9044         <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">
9045                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9046                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9047                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9048                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9049                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9050                 </fields>
9051                 <links>
9052                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9053                 </links>
9054         </class>
9055
9056     <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">
9057         <fields>
9058             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9059             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9060             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9061         </fields>
9062                 <links>
9063                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9064                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9065                 </links>
9066     </class>
9067
9068     <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">
9069         <fields>
9070             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9071             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9072         </fields>
9073                 <links>
9074                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9075                 </links>
9076     </class>
9077
9078     <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">
9079         <fields>
9080             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9081             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9082             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9083         </fields>
9084                 <links>
9085                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9086                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9087                 </links>
9088     </class>
9089
9090     <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">
9091         <fields>
9092             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9093             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9094         </fields>
9095                 <links>
9096                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9097                 </links>
9098     </class>
9099
9100     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9101                 <oils_persist:source_definition>
9102
9103             SELECT  DISTINCT l.*
9104               FROM  action.unfulfilled_hold_loops l
9105                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9106               WHERE l.count = m.max
9107
9108                 </oils_persist:source_definition>
9109         <fields>
9110             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9111             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9112             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9113         </fields>
9114                 <links>
9115                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9116                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9117                 </links>
9118     </class>
9119
9120         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9121                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9122                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9123                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9124                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9125                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9126                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9127                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9128                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9129                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9130                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9131                 </fields>
9132                 <links>
9133                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9134                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9135                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9136                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9137                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9138                 </links>
9139         </class>
9140
9141         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9142                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9143                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9144                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9146                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9147                 </fields>
9148                 <links>
9149                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9150                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9151                 </links>
9152         </class>
9153
9154         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9155                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9156                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9157                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9158                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9159                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9160                 </fields>
9161                 <links>
9162                 </links>
9163         </class>
9164
9165         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9166                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9167                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9168                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9169                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9170                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9171                 </fields>
9172                 <links>
9173                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9174                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9175                 </links>
9176         </class>
9177         
9178         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9179                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9180                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9181                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9182                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9183                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9184                 </fields>
9185                 <links>
9186                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9187                 </links>
9188         </class>
9189         
9190         <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">
9191                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9192                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9193                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9194                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9195                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9196                 </fields>
9197                 <links>
9198                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9199                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9200                 </links>
9201         </class>
9202
9203         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9204                 <fields oils_persist:primary="name">
9205                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9206                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9207                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9208                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9209                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9210                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9211                 </fields>
9212                 <links>
9213                 </links>
9214         </class>
9215
9216         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9217                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9218                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9219                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9220                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9221                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9222                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9223                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9224                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9225                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9226                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9227                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9228                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9229                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9230                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9231                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9232                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9233                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9234                 </fields>
9235                 <links>
9236                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9237                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9238                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9239                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9240                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9241                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9242                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9243                 </links>
9244         </class>
9245
9246         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9247                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9248                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9249                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9250                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9251                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9252                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9253                 </fields>
9254                 <links>
9255                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9256                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9257                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9258                 </links>
9259         </class>
9260
9261         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9262                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9263                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9264                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9265                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9266                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9267                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9268                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9269                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9270                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9271                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9272                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9273                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9274                 </fields>
9275                 <links>
9276                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9277                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9278                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9279                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9280                 </links>
9281         </class>
9282
9283         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9284                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9285                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9286                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9287                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9288                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9289                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9290                 </fields>
9291                 <links>
9292                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9293                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9294                 </links>
9295         </class>
9296
9297         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9298                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9299                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9300                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9302                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9303                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9304                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9305                 </fields>
9306                 <links>
9307                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9308                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9309                 </links>
9310         </class>
9311
9312         <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">
9313                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9314                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9315                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9316                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9317                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9318                 </fields>
9319                 <links>
9320                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9321                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9322                 </links>
9323         </class>
9324
9325         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9326                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9327                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9328                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9329                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9330                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9331                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9332                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9333                 </fields>
9334                 <links>
9335                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9336                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9337                 </links>
9338         </class>
9339
9340         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9341                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9342                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9343                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9344                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9345                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9346                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9347                 </fields>
9348                 <links>
9349                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9350                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9351                 </links>
9352         </class>
9353
9354         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9355                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9356                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9357                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9358                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9359                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9360                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9361                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9362                 </fields>
9363                 <links>
9364                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9365                 </links>
9366         </class>
9367
9368         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9369                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9370                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9371                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9372                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9373                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9374                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9375                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9376                 </fields>
9377                 <links>
9378                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9379                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9380                 </links>
9381         </class>
9382
9383         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9384                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9385                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9386                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9387                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9388                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9389                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9390                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9391                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9392                 </fields>
9393                 <links>
9394                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9395                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9396                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9397                 </links>
9398         </class>
9399
9400         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9401                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9402                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9403                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9404                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9405                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9406                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9407                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9408                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9409                 </fields>
9410                 <links>
9411                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9412                 </links>
9413         </class>
9414
9415         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9416                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9417                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9418                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9419                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9420                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9421                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9422                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9423                 </fields>
9424                 <links>
9425                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9426                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9427                 </links>
9428         </class>
9429
9430         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9431                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9432                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9433                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9434                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9436                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9437                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9438                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9439                 </fields>
9440                 <links>
9441                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9442                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9443                 </links>
9444         </class>
9445
9446         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9447                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9448                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9449                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9450                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9451                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9452                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9453                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9454                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9455                 </fields>
9456                 <links>
9457                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9458                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9459                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9460                 </links>
9461         </class>
9462
9463         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9464                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9465                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9466                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9467                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9468                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9469                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9470                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9471                 </fields>
9472                 <links>
9473                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9474                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9475                 </links>
9476         </class>
9477
9478         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9479                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9480                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9481                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9482                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9483                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9484                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9485                 </fields>
9486                 <links>
9487                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9488                 </links>
9489         </class>
9490
9491         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9492                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9493                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9494                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9495                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9496                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9497                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9498                 </fields>
9499                 <links>
9500                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9501                 </links>
9502         </class>
9503
9504         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9505                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9506                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9507                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9508                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9509                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9510                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9511                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9512                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9513                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9514                 </fields>
9515                 <links>
9516                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9517                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9518                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9519                 </links>
9520         </class>
9521
9522         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9523                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9524                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9525                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9526                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9527                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9528                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9529                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9530                 </fields>
9531                 <links>
9532                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9533                 </links>
9534         </class>
9535
9536         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9537                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9538                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9539                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9540                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9541                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9542                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9543                 </fields>
9544                 <links>
9545                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9546                 </links>
9547         </class>
9548
9549         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9550                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9551                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9552                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9553                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9554                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9555                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9556                 </fields>
9557                 <links>
9558                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9559                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9560                 </links>
9561         </class>
9562
9563         <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">
9564                 <fields oils_persist:primary="id">
9565                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9566                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9567                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9568                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9569                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9570                 </fields>
9571                 <links>
9572                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9573                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9574                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9575                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9576                 </links>
9577         </class>
9578
9579         <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">
9580                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9582                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9583                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9584                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9585                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9586                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9587                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9588                 </fields>
9589                 <links/>
9590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9591                         <actions>
9592                                 <retrieve/>
9593                         </actions>
9594                 </permacrud>
9595         </class>
9596
9597         <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">
9598                 <fields oils_persist:primary="ptype_key">
9599                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9600                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9601                 </fields>
9602                 <links/>
9603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9604                         <actions>
9605                                 <retrieve/>
9606                         </actions>
9607                 </permacrud>
9608         </class>
9609
9610         <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">
9611                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9612                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9613                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9614                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9615                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9616                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9617                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9618                 </fields>
9619                 <links>
9620                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9621                 </links>
9622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9623                         <actions>
9624                                 <retrieve/>
9625                         </actions>
9626                 </permacrud>
9627         </class>
9628
9629         <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">
9630                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9631                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9632                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9633                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9634                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9635                 </fields>
9636                 <links>
9637                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9638                 </links>
9639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9640                         <actions>
9641                                 <retrieve/>
9642                         </actions>
9643                 </permacrud>
9644         </class>
9645
9646     <class
9647         id="uvs"
9648         controller="open-ils.cstore open-ils.pcrud"
9649         oils_obj:fieldmapper="url_verify::session"
9650         oils_persist:tablename="url_verify.session"
9651         reporter:label="URL Verification Session"
9652     >
9653         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9654             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9655             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9656                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9657             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9658             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9659             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9660             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9661             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9662             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9663         </fields>
9664
9665         <links>
9666             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9667             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9668             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9669             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9670             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9671         </links>
9672
9673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9674             <actions>
9675                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9676             </actions>
9677         </permacrud>
9678
9679     </class>
9680
9681     <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">
9682         <oils_persist:source_definition>
9683             SELECT
9684                 cbrebi.id AS id,  -- so we can have a pkey in our view
9685                 uvs.id AS session,
9686                 uvs.owning_lib,
9687                 cbrebi.target_biblio_record_entry
9688             FROM url_verify.session uvs
9689             JOIN container.biblio_record_entry_bucket cbreb
9690                 ON (uvs.container = cbreb.id)
9691             JOIN container.biblio_record_entry_bucket_item cbrebi
9692                 ON (cbrebi.bucket = cbreb.id)
9693         </oils_persist:source_definition>
9694         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9695             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9696             <field reporter:label="Session" name="session" reporter:datatype="link" />
9697             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9698             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9699         </fields>
9700         <links>
9701             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9702             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9703             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9704         </links>
9705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9706             <actions>
9707                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9708             </actions>
9709         </permacrud>
9710     </class>
9711
9712     <class
9713         id="uvus"
9714         controller="open-ils.cstore open-ils.pcrud"
9715         oils_obj:fieldmapper="url_verify::url_selector"
9716         oils_persist:tablename="url_verify.url_selector"
9717         reporter:label="URL Verification URL Selector"
9718     >
9719         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9720             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9721             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9722                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9723             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9724         </fields>
9725
9726         <links>
9727             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9728             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9729         </links>
9730
9731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9732             <actions>
9733                 <create permission="URL_VERIFY">
9734                     <context link="session" field="owning_lib"/>
9735                 </create>
9736                 <retrieve permission="URL_VERIFY">
9737                     <context link="session" field="owning_lib"/>
9738                 </retrieve>
9739                 <update permission="URL_VERIFY">
9740                     <context link="session" field="owning_lib"/>
9741                 </update>
9742                 <delete permission="URL_VERIFY">
9743                     <context link="session" field="owning_lib"/>
9744                 </delete>
9745             </actions>
9746         </permacrud>
9747
9748     </class>
9749
9750     <class
9751         id="uvu"
9752         controller="open-ils.cstore open-ils.pcrud"
9753         oils_obj:fieldmapper="url_verify::url"
9754         oils_persist:tablename="url_verify.url"
9755         reporter:label="URL Verification URL"
9756     >
9757         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9758             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9759                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9760                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9761                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9762                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9763             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9764             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9765             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9766             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9767             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9768             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9769             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9770             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9771             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9772             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9773             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9774             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9775             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9776         </fields>
9777
9778         <links>
9779             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9780             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9781             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9782             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9783             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9784         </links>
9785
9786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9787             <actions>
9788                 <create permission="URL_VERIFY">
9789                     <context link="session" field="owning_lib"/>
9790                 </create>
9791                 <retrieve permission="URL_VERIFY">
9792                     <context link="session" field="owning_lib"/>
9793                 </retrieve>
9794                 <update permission="URL_VERIFY">
9795                     <context link="session" field="owning_lib"/>
9796                 </update>
9797                 <delete permission="URL_VERIFY">
9798                     <context link="session" field="owning_lib"/>
9799                 </delete>
9800             </actions>
9801         </permacrud>
9802
9803     </class>
9804
9805     <class
9806         id="uvva"
9807         controller="open-ils.cstore open-ils.pcrud"
9808         oils_obj:fieldmapper="url_verify::verification_attempt"
9809         oils_persist:tablename="url_verify.verification_attempt"
9810         reporter:label="URL Verification Attempt"
9811     >
9812         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9813             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9814                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9815                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9816             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9817             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9818         </fields>
9819
9820         <links>
9821             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9822             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9823         </links>
9824
9825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9826             <actions>
9827                 <create permission="URL_VERIFY">
9828                     <context link="session" field="owning_lib"/>
9829                 </create>
9830                 <retrieve permission="URL_VERIFY">
9831                     <context link="session" field="owning_lib"/>
9832                 </retrieve>
9833                 <update permission="URL_VERIFY">
9834                     <context link="session" field="owning_lib"/>
9835                 </update>
9836                 <delete permission="URL_VERIFY">
9837                     <context link="session" field="owning_lib"/>
9838                 </delete>
9839             </actions>
9840         </permacrud>
9841
9842     </class>
9843
9844     <class
9845         id="uvuv"
9846         controller="open-ils.cstore open-ils.pcrud"
9847         oils_obj:fieldmapper="url_verify::url_verification"
9848         oils_persist:tablename="url_verify.url_verification"
9849         reporter:label="URL Verification"
9850     >
9851         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9852             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9853                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9854                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9855             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9856             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9857             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9858             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9859                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9860         </fields>
9861
9862         <links>
9863             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9864             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9865             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9866         </links>
9867
9868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9869             <actions>
9870                 <create permission="URL_VERIFY">
9871                     <context link="attempt" jump="session" field="owning_lib"/>
9872                 </create>
9873                 <retrieve permission="URL_VERIFY">
9874                     <context link="attempt" jump="session" field="owning_lib"/>
9875                 </retrieve>
9876                 <update permission="URL_VERIFY">
9877                     <context link="attempt" jump="session" field="owning_lib"/>
9878                 </update>
9879                 <delete permission="URL_VERIFY">
9880                     <context link="attempt" jump="session" field="owning_lib"/>
9881                 </delete>
9882             </actions>
9883         </permacrud>
9884
9885     </class>
9886
9887         <class
9888                 id="cfdi"
9889                 controller="open-ils.cstore open-ils.pcrud"
9890                 oils_obj:fieldmapper="config::filter_dialog_interface"
9891                 oils_persist:tablename="config.filter_dialog_interface"
9892                 reporter:label="FilterDialog Interface">
9893                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9894                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9895                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9896                 </fields>
9897                 <links>
9898                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9899                 </links>
9900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9901                         <actions>
9902                                 <retrieve />
9903                         </actions>
9904                 </permacrud>
9905         </class>
9906
9907         <class
9908                 id="cfdfs"
9909                 controller="open-ils.cstore open-ils.pcrud"
9910                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9911                 oils_persist:tablename="config.filter_dialog_filter_set"
9912                 reporter:label="FilterDialog Filter Set">
9913                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9914                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9915                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9916                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9917                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9918                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9919                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9920                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9921                 </fields>
9922                 <links>
9923                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9924                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9925                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9926                 </links>
9927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9928                         <actions>
9929                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9930                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9931                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9932                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9933                         </actions>
9934                 </permacrud>
9935
9936         </class>
9937
9938         <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">
9939                 <fields oils_persist:primary="code">
9940                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9941                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9942                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9943                 </fields>
9944                 <links/>
9945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9946                         <actions>
9947                                 <retrieve/>
9948                         </actions>
9949                 </permacrud>
9950         </class>
9951
9952         <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">
9953                 <oils_persist:source_definition>
9954
9955             SELECT  b.id,
9956                     MAX(dcp.edit_date) AS last_delete_date
9957              FROM   biblio.record_entry b
9958                     JOIN asset.call_number cn ON (cn.record = b.id)
9959                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9960              WHERE  NOT b.deleted
9961              GROUP BY b.id
9962              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9963
9964                 </oils_persist:source_definition>
9965                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9966                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9967                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9968                 </fields>
9969                 <links>
9970                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9971                 </links>
9972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9973                         <actions>
9974                                 <retrieve/>
9975                         </actions>
9976                 </permacrud>
9977         </class>
9978
9979         <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">
9980                 <oils_persist:source_definition>
9981
9982             -- -- 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.
9983             -- -- 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
9984             -- -- may not.
9985             -- SELECT
9986             --     bre.id AS "bib_id",
9987             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9988             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9989             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9990             -- FROM (
9991                 SELECT
9992                     y.bre AS "id",
9993                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9994                     y.hold_count AS "hold_count",
9995                     (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"
9996                 FROM (
9997                         SELECT
9998                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9999                             COUNT(*) AS "hold_count"
10000                         FROM action.hold_request h
10001                         WHERE
10002                             cancel_time IS NULL
10003                             AND fulfillment_time IS NULL
10004                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10005                         GROUP BY 1
10006                     )y LEFT JOIN (
10007                         SELECT 
10008                             (SELECT id
10009                                 FROM biblio.record_entry 
10010                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10011                             ) AS "bre", 
10012                             COUNT(*) AS "copy_count"
10013                         FROM asset.copy
10014                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10015                         WHERE copy.holdable 
10016                             AND NOT copy.deleted 
10017                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10018                         GROUP BY 1
10019                     )x ON x.bre = y.bre
10020                 -- )z RIGHT JOIN (
10021                 --     SELECT id
10022                 --     FROM biblio.record_entry
10023                 --     WHERE NOT deleted
10024                 -- )bre ON (z.bib_id = bre.id)
10025                 
10026
10027                 </oils_persist:source_definition>
10028                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10029                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10030                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10031                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10032                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10033                 </fields>
10034                 <links>
10035                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10036                 </links>
10037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10038                         <actions>
10039                                 <retrieve/>
10040                         </actions>
10041                 </permacrud>
10042         </class>
10043
10044         <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">
10045                 <oils_persist:source_definition>
10046             SELECT *,
10047                 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,
10048                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10049             FROM
10050                 (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
10051                     FROM
10052                         action.hold_request ahr
10053                         JOIN reporter.hold_request_record rhrr USING (id)
10054                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10055                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10056                     WHERE
10057                         ahr.cancel_time IS NULL
10058                         AND ahr.fulfillment_time IS NULL
10059                     GROUP BY bib_record, pickup_lib
10060                 )x
10061                 JOIN
10062                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10063                     FROM
10064                         action.hold_request ahr
10065                         JOIN reporter.hold_request_record rhrr USING (id)
10066                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10067                     WHERE
10068                         ahr.cancel_time IS NULL
10069                         AND ahr.fulfillment_time IS NULL
10070                     GROUP BY bib_record
10071                 )y
10072                 USING (id)
10073                 </oils_persist:source_definition>
10074                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10075                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10076                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10077                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10078                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10079                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10080                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10081                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10082                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10083                 </fields>
10084                 <links>
10085                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10086                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10087                 </links>
10088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10089                         <actions>
10090                                 <retrieve/>
10091                         </actions>
10092                 </permacrud>
10093         </class>
10094
10095         <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">
10096                 <oils_persist:source_definition>
10097             SELECT
10098                 ac.id,
10099                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10100                 MAX(actac.xact_start) AS last_circ
10101             FROM asset.copy ac
10102                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10103             GROUP BY ac.id
10104
10105             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10106             --SELECT
10107             --    ac.id,
10108             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10109             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10110             --FROM asset.copy ac
10111             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10112             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10113             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10114                 </oils_persist:source_definition>
10115                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10116                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10117                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10118                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10119                 </fields>
10120                 <links>
10121                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10122                 </links>
10123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10124                         <actions>
10125                                 <retrieve/>
10126                         </actions>
10127                 </permacrud>
10128         </class>
10129
10130         <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">
10131                 <fields oils_persist:primary="id">
10132                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10133                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10134                 </fields>
10135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10136                         <actions>
10137                                 <retrieve/>
10138                         </actions>
10139                 </permacrud>
10140         </class>
10141
10142         <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">
10143                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10144                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10145                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10146                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10147                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10148                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10149                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10150                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10151                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10152                 </fields>
10153                 <links>
10154                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10155                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10156                 </links>
10157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10158                         <actions>
10159                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10160                                 <retrieve/>
10161                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10162                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10163                         </actions>
10164                 </permacrud>
10165         </class>
10166
10167         <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">
10168                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10169                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10170                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10171                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10172                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10173                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10174                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10175                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10176                 </fields>
10177                 <links>
10178                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10179                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10180                 </links>
10181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10182                         <actions>
10183                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10184                                 <retrieve/>
10185                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10186                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10187                         </actions>
10188                 </permacrud>
10189         </class>
10190
10191
10192         <!-- ********************************************************************************************************************* -->
10193         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10194         <!-- ********************************************************************************************************************* -->
10195         <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">
10196                 <fields oils_persist:primary="id">
10197                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10198                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10199                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10200                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10201                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10202                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10203                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10204                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10205                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10206                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10207                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10208                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10209                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10210                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10211                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10212                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10213                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10214                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10215                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10216                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10217                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10218                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10219                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10220                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10221                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10222                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10223                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10224                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10225                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10226                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10227                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10228                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10229                 </fields>
10230                 <links>
10231                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10232                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10233                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10234                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10235                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10236                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10237                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10238                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10239                 </links>
10240         </class>
10241
10242         <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">
10243                 <fields oils_persist:primary="id">
10244                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10245                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10246                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10247                 </fields>
10248                 <links>
10249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10250                 </links>
10251         </class>
10252
10253         <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">
10254                 <fields oils_persist:primary="id">
10255                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10256                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10257                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10258                 </fields>
10259                 <links>
10260                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10261                 </links>
10262         </class>
10263
10264         <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">
10265                 <fields oils_persist:primary="id">
10266                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10267
10268                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10269                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10270                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10271
10272                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10273                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10274                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10275
10276                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10277                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10278
10279                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10280                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10281                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10282
10283                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10284                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10285
10286                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10287                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10288                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10289
10290                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10291                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10292                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10293
10294                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10295                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10296                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10297                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10298
10299                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10300                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10301
10302                 </fields>
10303                 <links>
10304                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10305                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10306                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10307                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10308                 </links>
10309         </class>
10310
10311         <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">
10312                 <oils_persist:source_definition>
10313
10314             SELECT
10315                 po.ordering_agency AS ordering_agency,
10316                 po.id AS purchase_order,
10317                 li.id AS lineitem,
10318                 lid.id AS lineitem_detail,
10319                 cpa.id AS claim_policy_action
10320             FROM
10321                 acq.lineitem_detail lid
10322                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10323                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10324                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10325                 JOIN acq.claim_policy_action cpa ON (
10326                     cpa.claim_policy = cp.id
10327
10328                     -- we only care about claim policy actions whose claim
10329                     -- interval we'd reached or exceeded
10330                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10331
10332                     -- filter out all claim policy actions where claim events
10333                     -- have occurred on or after the action's action_interval
10334                     AND NOT EXISTS (
10335                         SELECT 1
10336                         FROM
10337                             acq.claim_event evt
10338                             JOIN acq.claim claim ON (
10339                                 claim.id = evt.claim
10340                                 AND claim.lineitem_detail = lid.id
10341                             )
10342                         WHERE
10343                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10344                     )
10345                 )
10346             WHERE
10347                 lid.cancel_reason IS NULL
10348                 AND li.cancel_reason IS NULL -- belt/suspenders
10349                 AND po.cancel_reason IS NULL -- belt/suspenders
10350                 AND lid.recv_time IS NULL
10351                 AND po.state = 'on-order'
10352             ORDER BY 1, 2, 3, 4, 5
10353
10354                 </oils_persist:source_definition>
10355                 <fields>
10356                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10357                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10358                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10359                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10360                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10361                 </fields>
10362                 <links>
10363                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10364                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10365                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10366                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10367                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10368                 </links>
10369         </class>
10370         <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">
10371                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10372                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10373                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10374                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10375                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10376                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10377                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10378                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10379                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10380                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10381                 </fields>
10382                 <links>
10383                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10384                 </links>
10385     </class>
10386         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10387                 <oils_persist:source_definition>
10388             SELECT * FROM acq.lineitem_summary 
10389                                 WHERE item_count > (invoice_count + cancel_count)
10390         </oils_persist:source_definition>
10391                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10392                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10393                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10394                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10395                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10396                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10397                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10398                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10399                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10400                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10401                 </fields>
10402                 <links>
10403                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10404                 </links>
10405     </class>
10406         <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">
10407                 <oils_persist:source_definition>
10408
10409                         SELECT  t.*
10410                           FROM  action.transit_copy t
10411                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10412                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10413                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10414
10415                 </oils_persist:source_definition>
10416                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10417                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10418                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10419                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10420                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10421                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10422                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10423                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10424                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10425                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10426                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10427                 </fields>
10428                 <links>
10429                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10430                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10431                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10432                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10433                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10434                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10435                 </links>
10436         </class>
10437
10438     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10439                 <oils_persist:source_definition>
10440
10441         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10442                 SELECT
10443                         cp.id as copy,
10444                         COUNT(circ.id),
10445                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10446                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10447                 FROM
10448                         asset.copy cp
10449                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10450                 GROUP BY 1, 3, 4
10451                 UNION ALL
10452                 SELECT
10453                         cp.id as copy,
10454                         COUNT(circ.id),
10455                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10456                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10457                 FROM
10458                         asset.copy cp
10459                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10460                 GROUP BY 1, 3, 4
10461                 UNION ALL
10462                 SELECT
10463                         id as copy,
10464                         circ_count,
10465                         -1 AS year,
10466                         false as is_renewal
10467                 FROM
10468                         extend_reporter.legacy_circ_count
10469         )x GROUP BY 1, 3, 4
10470
10471                 </oils_persist:source_definition>
10472         <fields>
10473             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10474             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10475             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10476             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10477         </fields>
10478                 <links>
10479                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10480                 </links>
10481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10482                         <actions>
10483                                 <retrieve/>
10484                         </actions>
10485                 </permacrud>
10486     </class>
10487
10488         <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">
10489                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10490                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10491                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10492                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10493                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10494                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10495                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10496                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10497                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10498                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10499                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10500                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10501                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10502                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10503                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10504                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10505                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10506                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10507                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10508                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10509                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10510                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10511                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10512                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10513                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10514                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10515                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10516                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10517                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10518                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10519                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10520                 </fields>
10521                 <links>
10522                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10523                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10524                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10525                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10526                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10528                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10529                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10530                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10531                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10532                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10533                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10534                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10535                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10536                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10537                 </links>
10538         </class>
10539
10540     <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">
10541         <fields oils_persist:primary="id">
10542             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10543             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10544             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10545             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10546             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10547             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10548             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10549             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10550             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10551             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10552             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10553             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10554             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10555             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10556             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10557             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10558             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10559             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10560             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10561             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10562             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10563             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10564             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10565             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10566             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10567             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10568             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10569             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10570             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10571             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10572             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10573             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10574             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10575             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10576         </fields>
10577         <links>
10578             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10579             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10580             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10581             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10582             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10583         </links>
10584     </class>
10585
10586     <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">
10587         <fields oils_persist:primary="id">
10588             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10589             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10590             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10591             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10592         </fields>
10593         <links>
10594             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10595             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10596         </links>
10597     </class>
10598
10599     <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">
10600         <fields oils_persist:primary="owning_lib">
10601             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10602             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10603             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10604         </fields>
10605         <links>
10606             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10607         </links>
10608     </class>
10609
10610     <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">
10611         <fields oils_persist:primary="id">
10612             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10613             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10614             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10615             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10616             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10617         </fields>
10618         <links>
10619             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10620             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10621             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10622         </links>
10623     </class>
10624
10625     <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">
10626         <fields oils_persist:primary="circ_lib">
10627             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10628             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10629             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10630             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10631         </fields>
10632         <links>
10633             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10634             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10635         </links>
10636     </class>
10637
10638     <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">
10639         <fields oils_persist:primary="id">
10640             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10641             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10642             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10643             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10644             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10645         </fields>
10646         <links>
10647             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10648             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10649             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10650         </links>
10651     </class>
10652
10653     <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">
10654         <fields oils_persist:primary="home_ou">
10655             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10656             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10657             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10658             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10659         </fields>
10660         <links>
10661             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10662             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10663         </links>
10664     </class>
10665         <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">
10666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10667                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10668                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10669                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10670                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10671                 </fields>
10672                 <links>
10673                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10674                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10675                 </links>
10676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10677                         <actions>
10678                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10679                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10680                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10681                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10682                         </actions>
10683                 </permacrud>
10684         </class>
10685         <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">
10686                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10687                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10688                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10689                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10690                 </fields>
10691                 <links>
10692                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10693                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10694                         </links>
10695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10696                 <actions>
10697                                 <create permission="ADMIN_ACQ_FUND_TAG">
10698                                         <context link="tag" field="owner"/>
10699                                 </create>
10700                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10701                                         <context link="tag" field="owner"/>
10702                                 </retrieve>
10703                                 <update permission="ADMIN_ACQ_FUND_TAG">
10704                                         <context link="tag" field="owner"/>
10705                                 </update>
10706                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10707                                         <context link="tag" field="owner"/>
10708                                 </delete>
10709                         </actions>
10710                 </permacrud>
10711         </class>
10712         <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">
10713                 <oils_persist:source_definition><![CDATA[
10714                 SELECT
10715                         poi.purchase_order AS purchase_order,
10716                         ii.invoice AS invoice,
10717                         NULL AS lineitem,
10718                         poi.id AS po_item,
10719                         NULL AS picklist
10720                 FROM
10721                         acq.po_item poi
10722                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10723                 UNION SELECT
10724                         jub.purchase_order AS purchase_order,
10725                         ie.invoice AS invoice,
10726                         jub.id AS lineitem,
10727                         NULL AS po_item,
10728                         jub.picklist AS picklist
10729                 FROM
10730                         acq.lineitem jub
10731                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10732                 UNION SELECT
10733                         ii.purchase_order AS purchase_order,
10734                         ii.invoice AS invoice,
10735                         NULL AS lineitem,
10736                         NULL AS po_item,
10737                         NULL AS picklist
10738                 FROM
10739                         acq.invoice_item ii
10740                 WHERE ii.po_item IS NULL
10741                 UNION SELECT
10742                         ie.purchase_order AS purchase_order,
10743                         ie.invoice AS invoice,
10744                         NULL AS lineitem,
10745                         NULL AS po_item,
10746                         NULL AS picklist
10747                 FROM
10748                         acq.invoice_entry ie
10749                 WHERE ie.lineitem IS NULL
10750                 UNION SELECT
10751                         NULL AS purchase_order,
10752                         NULL AS invoice,
10753                         jub.id AS lineitem,
10754                         NULL AS po_item,
10755                         jub.picklist AS picklist
10756                 FROM
10757                         acq.lineitem jub
10758                 WHERE jub.purchase_order IS NULL
10759                 ]]></oils_persist:source_definition>
10760                 <fields>
10761                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10762                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10763                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10764                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10765                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10766                 </fields>
10767                 <links>
10768                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10769                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10770                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10771                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10772                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10773                 </links>
10774         </class>
10775         <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">
10776                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10777                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10778                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10779                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10780                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10781                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10782                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10783                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10784                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10785                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10786                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10787                 </fields>
10788                 <links>
10789                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10790                 </links>
10791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10792                         <actions>
10793                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10794                                 <retrieve/>
10795                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10796                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10797                         </actions>
10798                 </permacrud>
10799         </class>
10800
10801         <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">
10802                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10803                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10804                         <field name="date_applied" reporter:datatype="timestamp"/>
10805                         <field name="org" reporter:datatype="org_unit"/>
10806                         <field name="original_value" reporter:datatype="text"/>
10807                         <field name="new_value" reporter:datatype="text"/>
10808                         <field name="field_name" reporter:datatype="link"/>
10809                 </fields>
10810                 <links>
10811                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10812                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10813                 </links>
10814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10815                         <actions>
10816                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10817                                 <retrieve/>
10818                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10819                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10820                         </actions>
10821                 </permacrud>
10822         </class>
10823         <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">
10824                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10825                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10826                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10827                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10828                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10829                 </fields>
10830                 <links>
10831                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10832                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10833                 </links>
10834         </class>
10835         <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">
10836                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10837                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10838                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10839                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10840                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10841                 </fields>
10842                 <links>
10843                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10844                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10845                 </links>
10846         </class>
10847
10848
10849         <!-- ********************************************************************************************************************* -->
10850
10851 </IDL>
10852
10853 <!--
10854     vim:noet:ts=4:sw=4:
10855 -->