]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Bib record browser with 'see also', etc from linked authority headings
[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="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1142                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1143                 </fields>
1144                 <links>
1145                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1146                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1147                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1148                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1149                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1150                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1151                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1152                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1153                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1154                 </links>
1155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1156                         <actions>
1157                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1158                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1159                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                         </actions>
1162                 </permacrud>
1163         </class>
1164
1165         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1166                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1167                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1168                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1169                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1170                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1171                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1172                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1176                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1177                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1178                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1179                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1180                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1181                 </fields>
1182                 <links>
1183                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1184                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1185                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1186                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                 </links>
1188         </class>
1189
1190         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1191                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1192                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1193                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1194                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1195                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1196                 </fields>
1197                 <links>
1198                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1199                 </links>
1200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1201                         <actions>
1202                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1203                     <context link="event_def" field="owner"/>
1204                 </create>
1205                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1206                     <context link="event_def" field="owner"/>
1207                 </retrieve>
1208                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1209                     <context link="event_def" field="owner"/>
1210                 </update>
1211                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1212                     <context link="event_def" field="owner"/>
1213                 </delete>
1214                         </actions>
1215                 </permacrud>
1216         </class>
1217
1218         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1219                 <oils_persist:source_definition><![CDATA[
1220                 SELECT  atevdef.hook,
1221                         atevdef.name,
1222                         atevdef.reactor,
1223                         atev.id,
1224                         atev.event_def,
1225                         atev.add_time,
1226                         atev.run_time,
1227                         atev.start_time,
1228                         atev.update_time,
1229                         atev.complete_time,
1230                         atev.update_process,
1231                         atev.state,
1232                         atev.user_data,
1233                         atev.template_output,
1234                         atev.error_output,
1235                         atev.async_output,
1236                         targ_circ.id AS target_circ,
1237                         targ_ahr.id AS target_hold,
1238                         COALESCE(
1239                                 targ_circ.circ_lib,
1240                                 targ_ahr.pickup_lib
1241                         ) AS perm_lib
1242                 FROM action_trigger.event atev
1243                 JOIN action_trigger.event_definition atevdef ON
1244                         (atevdef.id = atev.event_def)
1245                 JOIN action_trigger.hook ath ON
1246                         (ath.key = atevdef.hook)
1247                 LEFT JOIN action.circulation targ_circ ON
1248                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1249                 LEFT JOIN action.hold_request targ_ahr ON
1250                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1251                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1252                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1253                                 'circ.staff.max_visible_event_age',
1254                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1255                         ) UNION
1256                         SELECT '1000 YEARS'::INTERVAL AS value
1257                 ) ous)
1258                 ]]></oils_persist:source_definition>
1259                 <fields oils_persist:primary="id">
1260                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1261                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1262                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1263                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1264                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1265                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1266                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1267                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1271                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1272                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1273                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1274                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1275                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1276                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1277                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1278                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1279                 </fields>
1280                 <links>
1281                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1282                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1283                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1284                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1286                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1287                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1288                 </links>
1289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1290                         <actions>
1291                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1292                         </actions>
1293                 </permacrud>
1294         </class>
1295
1296         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1298                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1299                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1300                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1301                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1302                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1303                 </fields>
1304                 <links>
1305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1306                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1307                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1308                 </links>
1309         </class>
1310
1311         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1312                 <fields oils_persist:primary="code">
1313                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1314                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1315                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1316                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1318                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1319                 </fields>
1320                 <links/>
1321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1322             <actions>
1323                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1324                 <retrieve/>
1325                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1326                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1327             </actions>
1328         </permacrud>
1329         </class>
1330
1331         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1332                 <fields oils_persist:primary="code">
1333                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1334                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1335                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1336                 </fields>
1337                 <links/>
1338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1339             <actions>
1340                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1341                 <retrieve/>
1342                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1343                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1344             </actions>
1345         </permacrud>
1346         </class>
1347
1348         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1349                 <fields oils_persist:primary="code">
1350                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1351                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1352                 </fields>
1353                 <links/>
1354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1355             <actions>
1356                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1357                 <retrieve/>
1358                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1359                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1360             </actions>
1361         </permacrud>
1362         </class>
1363
1364         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1365                 <fields oils_persist:primary="code">
1366                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1367                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1368                 </fields>
1369                 <links/>
1370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1371             <actions>
1372                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1373                 <retrieve/>
1374                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1375                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1376             </actions>
1377         </permacrud>
1378         </class>
1379
1380         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1381                 <fields oils_persist:primary="code">
1382                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1383                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1384                 </fields>
1385                 <links/>
1386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1387             <actions>
1388                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1389                 <retrieve/>
1390                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1391                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1392             </actions>
1393         </permacrud>
1394         </class>
1395
1396         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1397                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1398                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1399                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1400                 </fields>
1401                 <links/>
1402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1403             <actions>
1404                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1405                 <retrieve/>
1406                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1407                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1408             </actions>
1409         </permacrud>
1410         </class>
1411
1412         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1413                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1414                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1415                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1416                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1417                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1418                 </fields>
1419         <links>
1420             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1421             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1422             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1423         </links>
1424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1425             <actions>
1426                 <create permission="UPDATE_COPY">
1427                     <context link="target_copy" field="circ_lib"/>
1428                 </create>
1429                 <retrieve/>
1430                 <update permission="UPDATE_COPY">
1431                     <context link="target_copy" field="circ_lib"/>
1432                 </update>
1433                 <delete permission="UPDATE_COPY">
1434                     <context link="target_copy" field="circ_lib"/>
1435                 </delete>
1436             </actions>
1437         </permacrud>
1438         </class>
1439
1440         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1441                 <fields oils_persist:primary="code">
1442                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1443                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1444                 </fields>
1445                 <links/>
1446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1447             <actions>
1448                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1449                 <retrieve/>
1450                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1451                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1452             </actions>
1453         </permacrud>
1454         </class>
1455
1456         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1457                 <fields oils_persist:primary="code">
1458                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1459                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1460                 </fields>
1461                 <links/>
1462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1463             <actions>
1464                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1465                 <retrieve/>
1466                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1467                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1468             </actions>
1469         </permacrud>
1470         </class>
1471
1472         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1473                 <fields oils_persist:primary="code">
1474                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1475                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1476                 </fields>
1477                 <links/>
1478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1479             <actions>
1480                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1481                 <retrieve/>
1482                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1483                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1484             </actions>
1485         </permacrud>
1486         </class>
1487
1488     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1489         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1490             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1491             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1492             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1493             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1494             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1495             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1496             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1497             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1498             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1499             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1500             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1501             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1506             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1507         </fields>
1508         <links/>
1509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1510             <actions>
1511                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1512                 <retrieve/>
1513                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1514                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1515             </actions>
1516         </permacrud>
1517     </class>
1518
1519     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1520         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1521             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1522             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1523             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1524             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1525             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1526             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1527             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1528             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1529             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1530             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1531             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1532             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1533             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1534             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1535             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1536             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1537             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1538             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1539             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1540         </fields>
1541         <links/>
1542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1543             <actions>
1544                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1545                 <retrieve/>
1546                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1547                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1548             </actions>
1549         </permacrud>
1550     </class>
1551
1552     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1553         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1554             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1555             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1556             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1557             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1558             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1559         </fields>
1560         <links>
1561             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1562             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1563             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1564         </links>
1565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1566             <actions>
1567                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1568                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1569                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571             </actions>
1572         </permacrud>
1573     </class>
1574
1575         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1576                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1577                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1578                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1579                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1580                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1581                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1582                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1586                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1587                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1588                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1589                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1593             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1594                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1595                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1596                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1597                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1598                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1599                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1600                 </fields>
1601                 <links>
1602                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1603                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1604                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1608                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1609                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1610                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1611                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1612                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1613                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1614                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1615             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1616                 </links>
1617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1618             <actions>
1619                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1620                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1621                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623             </actions>
1624         </permacrud>
1625         </class>
1626
1627         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1628                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1629                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1630                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1631                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1632                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1633                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1634                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1635                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1636                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1637                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1638                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1639                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1640                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1644             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1645                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1646                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1647             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1648                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1649                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1650                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1651                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1652             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1653             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1654             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1655                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1656                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1657                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1658                 </fields>
1659                 <links>
1660                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1661                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1662                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1665                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1666                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1667                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1668                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1669                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1670                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1671                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1672                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1673                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1674             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1675                 </links>
1676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1677             <actions>
1678                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1679                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1680                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682             </actions>
1683         </permacrud>
1684         </class>
1685
1686     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1687         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1688             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1689             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1690             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1691         </fields>
1692         <links/>
1693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1694             <actions>
1695                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1696                 <retrieve/>
1697                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1698                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1699             </actions>
1700         </permacrud>
1701     </class>
1702
1703     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1704         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1705             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1706             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1707             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1708             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1709             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1710             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1711             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1712         </fields>
1713         <links>
1714             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1715         </links>
1716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1717             <actions>
1718                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1719                 <retrieve/>
1720                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1721                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1722             </actions>
1723         </permacrud>
1724     </class>
1725
1726     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1727         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1728             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1729             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1730             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1731             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1732             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1733         </fields>
1734         <links>
1735             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1736             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1737         </links>
1738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1739             <actions>
1740                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1741                     <context link="matchpoint" field="org_unit"/>
1742                 </create>
1743                 <retrieve/>
1744                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1745                     <context link="matchpoint" field="org_unit"/>
1746                 </update>
1747                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1748                     <context link="matchpoint" field="org_unit"/>
1749                 </delete>
1750             </actions>
1751         </permacrud>
1752     </class>
1753
1754     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1755         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1756             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1757             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1758             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1759         </fields>
1760         <links>
1761             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1762             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1763         </links>
1764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1765             <actions>
1766                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1767                     <context link="limit_set" field="owning_lib"/>
1768                 </create>
1769                 <retrieve/>
1770                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1771                     <context link="limit_set" field="owning_lib"/>
1772                 </update>
1773                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1774                     <context link="limit_set" field="owning_lib"/>
1775                 </delete>
1776             </actions>
1777         </permacrud>
1778     </class>
1779     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1780         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1781             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1782             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1783             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1784         </fields>
1785         <links>
1786             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1787             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1788         </links>
1789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1790             <actions>
1791                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1792                     <context link="limit_set" field="owning_lib"/>
1793                 </create>
1794                 <retrieve/>
1795                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1796                     <context link="limit_set" field="owning_lib"/>
1797                 </update>
1798                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1799                     <context link="limit_set" field="owning_lib"/>
1800                 </delete>
1801             </actions>
1802         </permacrud>
1803     </class>
1804
1805     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1807             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1808             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1809             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1810             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1811         </fields>
1812         <links>
1813             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1814             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1815         </links>
1816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1817             <actions>
1818                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1819                     <context link="limit_set" field="owning_lib"/>
1820                 </create>
1821                 <retrieve/>
1822                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1823                     <context link="limit_set" field="owning_lib"/>
1824                 </update>
1825                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1826                     <context link="limit_set" field="owning_lib"/>
1827                 </delete>
1828             </actions>
1829         </permacrud>
1830     </class>
1831
1832         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1833                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1834                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1843                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1850                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1851                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1853                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1854                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1855                 </fields>
1856                 <links>
1857                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1858                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1859                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1860                 </links>
1861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1862             <actions>
1863                 <create permission="ADMIN_SURVEY">
1864                     <context link="survey" field="owner"/>
1865                 </create>
1866                 <retrieve/>
1867                 <update permission="ADMIN_SURVEY">
1868                     <context link="survey" field="owner"/>
1869                 </update>
1870                 <delete permission="ADMIN_SURVEY">
1871                     <context link="survey" field="owner"/>
1872                 </delete>
1873             </actions>
1874         </permacrud>
1875         </class>
1876         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1877                 <fields oils_persist:primary="id" oils_persist:sequence="">
1878                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1879                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1880                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1881                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1882                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1883                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1884                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1885                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1886                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1887                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1888                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1889                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1890                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1891                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1892                 </fields>
1893                 <links>
1894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1895                 </links>
1896         </class>
1897         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1898                 <fields oils_persist:primary="id" oils_persist:sequence="">
1899                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1900                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1901                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1902                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1903                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1904                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1905                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1906                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1907                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1908                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1909                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1910                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1911                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1912                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1913                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1914                 </fields>
1915                 <links>
1916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1917                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1918                 </links>
1919         </class>
1920         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1921                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1922                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1923                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1924                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1925                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1926                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1927                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1928                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1929                 </fields>
1930                 <links>
1931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1932                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1933                 </links>
1934         </class>
1935         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1937                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1938                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1939                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1940                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1941                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1942                 </fields>
1943                 <links>
1944                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1945                 </links>
1946         </class>
1947         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1949                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1950                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1951                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1952                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1953                 </fields>
1954                 <links>
1955                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1956                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1957                 </links>
1958         </class>
1959         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1960                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1961                         <field name="field" reporter:datatype="link"/>
1962                         <field name="id" reporter:datatype="id" />
1963                         <field name="source" reporter:datatype="link"/>
1964                         <field name="value" reporter:datatype="text"/>
1965                 </fields>
1966                 <links>
1967                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1968                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1969                 </links>
1970         </class>
1971         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1973                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1974                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1975                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1976                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1977                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1978                 </fields>
1979                 <links>
1980                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1981                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1982                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1983                 </links>
1984         </class>
1985         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1986                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1987                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1988                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1989                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1990                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1991                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1992                 </fields>
1993                 <links>
1994                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1995                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1996                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1997                 </links>
1998         </class>
1999         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2001                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2002                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2003                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2004                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2005                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2006                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2007                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2008                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2009                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2010                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2011                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2012                 </fields>
2013                 <links>
2014                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2015                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2016                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2017                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2018                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2019                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2020                 </links>
2021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022             <actions>
2023                 <create permission="TRANSIT_COPY" context_field="owner">
2024                     <context link="target_copy" field="circ_lib"/>
2025                 </create>
2026                 <retrieve/>
2027                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2028                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2029             </actions>
2030         </permacrud>
2031         </class>
2032         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2033                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2034                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2035                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2036                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2038                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2039                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2040                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2041                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2042                 </fields>
2043                 <links>
2044                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2045                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2046                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2047                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2048                 </links>
2049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2050             <actions>
2051                 <create permission="ADMIN_SURVEY">
2052                     <context link="survey" field="owner"/>
2053                 </create>
2054                 <retrieve/>
2055                 <update permission="ADMIN_SURVEY">
2056                     <context link="survey" field="owner"/>
2057                 </update>
2058                 <delete permission="ADMIN_SURVEY">
2059                     <context link="survey" field="owner"/>
2060                 </delete>
2061             </actions>
2062         </permacrud>
2063         </class>
2064         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2065                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2066                         <field name="bucket" />
2067                         <field name="id" reporter:datatype="id" />
2068                         <field name="target_copy" reporter:datatype="link"/>
2069                         <field name="create_time" reporter:datatype="timestamp" />
2070                         <field name="pos" reporter:datatype="int" />
2071                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2072                 </fields>
2073                 <links>
2074                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2075                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2076             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2077                 </links>
2078         </class>
2079         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2080                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2081                         <field name="id" reporter:datatype="id" />
2082                         <field name="item" reporter:datatype="link"/>
2083                         <field name="note" reporter:datatype="text" />
2084                 </fields>
2085                 <links>
2086                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2087                 </links>
2088         </class>
2089
2090         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2091                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2092                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2093                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2094                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2095                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2096                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2097                 </fields>
2098                 <links>
2099                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2100                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2101                 </links>
2102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2103                         <actions>
2104                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2105                                 <retrieve/>
2106                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2108                         </actions>
2109                 </permacrud>
2110         </class>
2111
2112         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2113                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2114                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2115                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2116                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2117                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2118                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2119                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2120                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2121                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2122                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2123                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2124                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2125                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2126                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2127                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2128                 </fields>
2129                 <links>
2130                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2131                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2132                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2133                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2134                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2135                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2136                 </links>
2137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2138                         <actions>
2139                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2140                                 <retrieve/>
2141                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2143                         </actions>
2144                 </permacrud>
2145         </class>
2146
2147         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2148                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2149                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2150                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2151                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2152                 </fields>
2153                 <links>
2154                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2155                 </links>
2156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157                         <actions>
2158                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                                 <retrieve/>
2160                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162                         </actions>
2163                 </permacrud>
2164         </class>
2165
2166         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2167                 <fields oils_persist:primary="code">
2168                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2169                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2170                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2171                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2172                 </fields>
2173                 <links>
2174                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2175                 </links>
2176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2177                         <actions>
2178                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2179                                 <retrieve/>
2180                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2181                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2182                         </actions>
2183                 </permacrud>
2184         </class>
2185
2186         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2187                 <fields oils_persist:primary="code">
2188                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2189                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2190                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2191                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2192                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2193                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2194                 </fields>
2195                 <links>
2196                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2197                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2198                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2199                 </links>
2200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2201                         <actions>
2202                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <retrieve/>
2204                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2205                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2206                         </actions>
2207                 </permacrud>
2208         </class>
2209
2210     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2211         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2212             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2213             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2214             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2215         </fields>
2216         <links>
2217             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2218             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2219         </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2223                 <retrieve/>
2224                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2225                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226             </actions>
2227         </permacrud>
2228     </class>
2229
2230         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2231                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2232                         <field name="active" reporter:datatype="bool"/>
2233                         <field name="create_date" reporter:datatype="timestamp"/>
2234                         <field name="creator" />
2235                         <field name="deleted" reporter:datatype="bool"/>
2236                         <field name="edit_date" reporter:datatype="timestamp"/>
2237                         <field name="editor" />
2238                         <field name="id" reporter:datatype="id" />
2239                         <field name="last_xact_id" />
2240                         <field name="marc" />
2241                         <field name="source" />
2242                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2243                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2244                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2245                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2247                 </fields>
2248                 <links>
2249                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2253                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2254                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2255                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2256                 </links>
2257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258                         <actions>
2259                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2260                                 <retrieve/>
2261                                 <update permission="UPDATE_MARC" global_required="true"/>
2262                                 <delete permission="UPDATE_MARC" global_required="true"/>
2263                         </actions>
2264                 </permacrud>
2265         </class>
2266         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2268                         <field name="char_encoding" />
2269                         <field name="id" />
2270                         <field name="record" />
2271                         <field name="record_status" />
2272                         <field name="thesaurus" />
2273                 </fields>
2274                 <links>
2275                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2276                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2277                 </links>
2278         </class>
2279         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2281                         <field name="id" reporter:datatype="id" />
2282                         <field name="bib" reporter:datatype="link" />
2283                         <field name="authority" reporter:datatype="link" />
2284                 </fields>
2285                 <links>
2286                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2287                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2288                 </links>
2289         </class>
2290         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2291                 <fields oils_persist:primary="code" oils_persist:sequence="">
2292                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2293                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2294                 </fields>
2295                 <links/>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2301                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2307                         <field name="accepting_usr" />
2308                         <field name="amount" reporter:datatype="money" />
2309                         <field name="amount_collected" reporter:datatype="money" />
2310                         <field name="approval_code" reporter:datatype="text"/>
2311                         <field name="cash_drawer" reporter:datatype="link"/>
2312                         <field name="cc_first_name" reporter:datatype="text"/>
2313                         <field name="cc_last_name" reporter:datatype="text"/>
2314                         <field name="cc_number" reporter:datatype="text"/>
2315                         <field name="cc_order_number" reporter:datatype="text"/>
2316                         <field name="cc_type" reporter:datatype="text"/>
2317                         <field name="cc_processor" reporter:datatype="text"/>
2318                         <field name="expire_month" reporter:datatype="int" />
2319                         <field name="expire_year" reporter:datatype="int" />
2320                         <field name="id" reporter:datatype="id" />
2321                         <field name="note" reporter:datatype="text"/>
2322                         <field name="payment_ts" reporter:datatype="timestamp"/>
2323                         <field name="xact" reporter:datatype="link"/>
2324                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2325                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2326                 </fields>
2327                 <links>
2328                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2329                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2330                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2331                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2332                 </links>
2333         </class>
2334         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2335                 <fields oils_persist:primary="name">
2336                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2337                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2338                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2339                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2340                 </fields>
2341                 <links/>
2342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2343             <actions>
2344                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2345                 <retrieve/>
2346                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2347                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2348             </actions>
2349         </permacrud>
2350         </class>
2351
2352         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2353                 <fields oils_persist:primary="alias">
2354                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2355                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2356                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2357                 </fields>
2358                 <links>
2359                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2360                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2361                 </links>
2362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2363             <actions>
2364                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2365                 <retrieve/>
2366                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2367                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2368             </actions>
2369         </permacrud>
2370         </class>
2371
2372         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2373                 <fields oils_persist:primary="name">
2374                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2375                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2376                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2377                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2378                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2379                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2380                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2381                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2382                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2383                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2384                 </fields>
2385                 <links>
2386                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2387                 </links>
2388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2389             <actions>
2390                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2391                 <retrieve/>
2392                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2393                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397
2398         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2399                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2400                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2401                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2402                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2403                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2404                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2405                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2406                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2407                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2408                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2409                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2410                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2411                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2412                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2413                 </fields>
2414                 <links>
2415                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2416                 </links>
2417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2418             <actions>
2419                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2420                 <retrieve/>
2421                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2422                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2423             </actions>
2424         </permacrud>
2425         </class>
2426         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2427                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2428                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2430                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2431                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2432                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2433                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2434                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2435                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2436                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2437                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2438                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2439                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2440                 </fields>
2441                 <links>
2442                 </links>
2443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2444                         <actions>
2445                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2446                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2448                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2449                         </actions>
2450                 </permacrud>
2451         </class>
2452         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2454                         <field name="id" reporter:datatype="id" />
2455                         <field name="name" reporter:datatype="text"/>
2456                         <field name="xpath" reporter:datatype="text"/>
2457                         <field name="format" reporter:datatype="link"/>
2458                         <field name="first_word" reporter:datatype="bool" />
2459                 </fields>
2460                 <links/>
2461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2462             <actions>
2463                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2464                 <retrieve/>
2465                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2466                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2467             </actions>
2468         </permacrud>
2469         </class>
2470         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2471                 <fields oils_persist:primary="code" oils_persist:sequence="">
2472                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2473                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2474                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2475                 </fields>
2476                 <links/>
2477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2478             <actions>
2479                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2480                 <retrieve/>
2481                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2482                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2483             </actions>
2484         </permacrud>
2485         </class>
2486         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
2487                 <fields oils_persist:primary="code" oils_persist:sequence="">
2488                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2489                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2490                 </fields>
2491                 <links/>
2492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2493             <actions>
2494                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2495                 <retrieve/>
2496                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2497                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2498             </actions>
2499         </permacrud>
2500         </class>
2501     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2502         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2503             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2504             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2505             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2506             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2507         </fields>
2508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509             <actions>
2510                 <retrieve/>
2511             </actions>
2512         </permacrud>
2513     </class>
2514         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2516                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2517                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2518                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2519                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2520                 </fields>
2521                 <links>
2522                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2523                 </links>
2524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2525             <actions>
2526                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2527                 <retrieve/>
2528                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2529                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2530             </actions>
2531         </permacrud>
2532         </class>
2533         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2536                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2537                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2538                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2539                 </fields>
2540                 <links>
2541                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2542                 </links>
2543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544             <actions>
2545                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2546                 <retrieve/>
2547                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2548                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2549             </actions>
2550         </permacrud>
2551         </class>
2552         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
2553                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2554                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2556                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2557                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2558                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2559                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2560                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2561                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2562                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2563                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2564                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2565                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2566                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2567                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2568                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2569                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2570                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2571                 </fields>
2572                 <links>
2573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2575                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2576                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2577                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2578                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2579                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2580                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2581                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2582                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2583                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2584                 </links>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2590                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2591             </actions>
2592         </permacrud>
2593         </class>
2594         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2595                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2596                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2597                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2599                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2600                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2601                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2606                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2607         </links>
2608         </class>
2609         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
2610                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2612                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2613                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2614                 </fields>
2615                 <links>
2616                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2617                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2618                 </links>
2619         </class>
2620         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2622                         <field name="id" reporter:datatype="id" />
2623                         <field name="value" oils_persist:i18n="true" />
2624                 </fields>
2625                 <links/>
2626         </class>
2627         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2628                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2629                         <field name="balance_owed" reporter:datatype="money" />
2630                         <field name="total_owed" reporter:datatype="money" />
2631                         <field name="total_paid" reporter:datatype="money" />
2632                         <field name="usr" reporter:datatype="link"/>
2633                 </fields>
2634                 <links>
2635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2636         </links>
2637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638             <actions>
2639                 <retrieve permission="VIEW_USER">
2640                     <context link="usr" field="home_ou"/>
2641                 </retrieve>
2642             </actions>
2643         </permacrud>
2644         </class>
2645         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
2646                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2647                         <field name="collector" />
2648                         <field name="enter_time" reporter:datatype="timestamp"/>
2649                         <field name="id" reporter:datatype="id" />
2650                         <field name="location" reporter:datatype="link"/>
2651                         <field name="usr" reporter:datatype="link"/>
2652                 </fields>
2653                 <links>
2654                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2655                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2657                 </links>
2658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659             <actions>
2660                 <create permission="money.collections_tracker.create" context_field="location"/>
2661                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2662                 <delete permission="money.collections_tracker.create" context_field="location"/>
2663             </actions>
2664         </permacrud>
2665         </class>
2666         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
2667                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2668                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2671                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2672                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2673                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2674                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2675                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2676                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2677                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2678                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2679                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2680                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2681                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2682                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2683                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2684                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2685                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2686                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2700                 </fields>
2701                 <links>
2702                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2703                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2704                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2705                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2706                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2707                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2708                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2709                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2710                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2711                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2712                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2713                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2714                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2715                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2716                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2717                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2718                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2719                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2720                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2721                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2722                 </links>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_MARC" global_required="true"/>
2728             </actions>
2729         </permacrud>
2730         </class>
2731         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
2732                 <fields oils_persist:primary="id">
2733                         <field name="dow_0_close" />
2734                         <field name="dow_0_open" />
2735                         <field name="dow_1_close" />
2736                         <field name="dow_1_open" />
2737                         <field name="dow_2_close" />
2738                         <field name="dow_2_open" />
2739                         <field name="dow_3_close" />
2740                         <field name="dow_3_open" />
2741                         <field name="dow_4_close" />
2742                         <field name="dow_4_open" />
2743                         <field name="dow_5_close" />
2744                         <field name="dow_5_open" />
2745                         <field name="dow_6_close" />
2746                         <field name="dow_6_open" />
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2749                 </fields>
2750                 <links>
2751                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2752                 </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2758                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2759             </actions>
2760         </permacrud>
2761         </class>
2762         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2764                         <field name="id" reporter:datatype="id" />
2765                         <field name="record" reporter:datatype="link"/>
2766                         <field name="label" reporter:datatype="text"/>
2767                         <field name="label_sortkey" reporter:datatype="text"/>
2768                 </fields>
2769                 <links>
2770                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2771                 </links>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2777                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2782                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2783                         <field name="id" reporter:datatype="id" />
2784                         <field name="target_copy" reporter:datatype="link" />
2785                         <field name="part" reporter:datatype="link"/>
2786                 </fields>
2787                 <links>
2788                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2789                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2790                 </links>
2791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2792             <actions>
2793                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2794                 <retrieve/>
2795                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2796                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2797             </actions>
2798         </permacrud>
2799         </class>
2800         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
2801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2802                         <field name="close_end" reporter:datatype="timestamp" />
2803                         <field name="close_start" reporter:datatype="timestamp" />
2804                         <field name="id" reporter:datatype="id" />
2805                         <field name="org_unit" reporter:datatype="org_unit"/>
2806                         <field name="reason" reporter:datatype="text"/>
2807                 </fields>
2808                 <links>
2809                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2816                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2822                         <field name="extended" reporter:datatype="interval"/>
2823                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2824                         <field name="max_renewals" reporter:datatype="int" />
2825                         <field name="name" reporter:datatype="text"/>
2826                         <field name="normal" reporter:datatype="interval"/>
2827                         <field name="shrt" reporter:datatype="interval"/>
2828                 </fields>
2829                 <links>
2830                 </links>
2831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2832             <actions>
2833                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2834                 <retrieve/>
2835                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2836                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2837             </actions>
2838         </permacrud>
2839         </class>
2840
2841         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2843                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2844                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2845             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2846                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2847             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2848                 </fields>
2849                 <links>
2850             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2851                 </links>
2852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853             <actions>
2854                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2855                 <retrieve/>
2856                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2857                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2858             </actions>
2859                 </permacrud>
2860         </class>
2861
2862         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2863                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2865                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2866                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2867             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2868                 </fields>
2869                 <links>
2870                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2871                 </links>
2872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2873             <actions>
2874                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2875                 <retrieve/>
2876                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2877                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2878             </actions>
2879                 </permacrud>
2880         </class>
2881
2882         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="">
2884                         <field name="balance_owed" reporter:datatype="money"/>
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="last_billing_note" reporter:datatype="text"/>
2887                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2888                         <field name="last_billing_type" reporter:datatype="text"/>
2889                         <field name="last_payment_note" reporter:datatype="text"/>
2890                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2891                         <field name="last_payment_type" reporter:datatype="text"/>
2892                         <field name="total_owed" reporter:datatype="money"/>
2893                         <field name="total_paid" reporter:datatype="money"/>
2894                         <field name="usr" reporter:datatype="link"/>
2895                         <field name="xact_finish" reporter:datatype="timestamp" />
2896                         <field name="xact_start" reporter:datatype="timestamp" />
2897                         <field name="xact_type" reporter:datatype="text"/>
2898                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field name="billing_location" reporter:datatype="link"/>
2903                 </fields>
2904                 <links>
2905                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2906                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2907                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2908                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2909                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2910                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2911                 </links>
2912         </class>
2913         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2915                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2916                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2925                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2926                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2927                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2928                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2929                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2930                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2931                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2932                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2933                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2934                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2935                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2936                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2937                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2938                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2939                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2940                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2941                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2942                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2943                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2944                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2945                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2946                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2947                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2948                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2949                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2950                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2951                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2952                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2953                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2954                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2955                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2956                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2957                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2958                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2959                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2960                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2961                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2962                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2963                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2964                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2965                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2966                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2968                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2978                 </fields>
2979                 <links>
2980                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2981                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2982                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2983                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2984                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2985                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2986                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2987                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2988                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2989                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2990                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2991                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2992                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2993                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2994                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2995                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2996                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2997                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2998                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2999                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3000                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3001                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3002                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3003                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3004                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3005                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3006                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3007                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3008                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3009                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3010                 </links>
3011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3012                         <actions>
3013                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3014                         </actions>
3015                 </permacrud>
3016         </class>
3017         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3019                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3020                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3021                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3022                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3023                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3024                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3025                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3026                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3027         </fields>
3028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029                         <actions>
3030                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3031                                 <retrieve/>
3032                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3033                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3034                         </actions>
3035                 </permacrud>
3036         </class>
3037         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3039                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3040                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3041                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3042                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3043         </fields>
3044         <links>
3045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3047                 </links>
3048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3049                         <actions>
3050                                 <retrieve permission="RUN_REPORTS">
3051                                         <context link="usr" field="home_ou" />
3052                                 </retrieve>
3053                         </actions>
3054                 </permacrud>
3055         </class>
3056         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3058                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3059                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3060                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3061                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3062                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3063                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3064         </fields>
3065         <links>
3066                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3067                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3068                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3069                 </links>
3070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071                         <actions>
3072                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3073                                         <context link="usr" field="home_ou" />
3074                                         <context link="ws" field="owning_lib" />
3075                                 </retrieve>
3076                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3077                                         <context link="usr" field="home_ou" />
3078                                         <context link="ws" field="owning_lib" />
3079                                 </create>
3080                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3081                                         <context link="usr" field="home_ou" />
3082                                         <context link="ws" field="owning_lib" />
3083                                 </update>
3084                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3085                                         <context link="usr" field="home_ou" />
3086                                         <context link="ws" field="owning_lib" />
3087                                 </delete>
3088                         </actions>
3089                 </permacrud>
3090         </class>
3091         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
3092                 <fields oils_persist:primary="name">
3093                         <field name="name" reporter:datatype="text"/>
3094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3095                 </fields>
3096                 <links/>
3097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3098                         <actions>
3099                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3100                                 <retrieve/>
3101                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3102                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3103                         </actions>
3104                 </permacrud>
3105         </class>
3106         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
3107                 <fields oils_persist:primary="name">
3108                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3109                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3110                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3111                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3112                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3113                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3114                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3115                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3116                 </fields>
3117                 <links>
3118                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3119                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3120                 </links>
3121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3122                         <actions>
3123                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3124                                 <retrieve/>
3125                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3126                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3127                         </actions>
3128                 </permacrud>
3129         </class>
3130         <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">
3131                 <fields oils_persist:primary="name">
3132                         <field name="name" reporter:datatype="text"/>
3133                         <field name="label" reporter:datatype="text"/>
3134                         <field name="description" reporter:datatype="text"/>
3135                         <field name="datatype" reporter:datatype="text"/>
3136                         <field name="view_perm" reporter:datatype="link"/>
3137                         <field name="update_perm" reporter:datatype="link"/>
3138                         <field name="fm_class" reporter:datatype="text"/>
3139                         <field name="grp" reporter:datatype="link"/>
3140                 </fields>
3141                 <links>
3142                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3143                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3144                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3145                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3146                 </links>
3147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3148                         <actions>
3149                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3150                                 <retrieve/>
3151                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3152                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3153                         </actions>
3154                 </permacrud>
3155         </class>
3156         <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">
3157                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3158                         <field name="id" />
3159                         <field name="name"  reporter:datatype="text"/>
3160                         <field name="org_unit" reporter:datatype="org_unit"/>
3161                         <field name="value"  reporter:datatype="text"/>
3162                 </fields>
3163                 <links>
3164                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3165                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3166                 </links>
3167         </class>
3168         <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">
3169                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3170                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3171                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3172                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3173                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3174                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3175                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3176                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3177                 </fields>
3178                 <links>
3179                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3180                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3181                 </links>
3182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3183             <actions>
3184                 <create permission="CREATE_COPY_NOTE">
3185                     <context link="owning_copy" field="circ_lib"/>
3186                 </create>
3187                 <retrieve permission="VIEW_COPY_NOTES">
3188                     <context link="owning_copy" field="circ_lib"/>
3189                 </retrieve>
3190                 <update permission="UPDATE_COPY_NOTE">
3191                     <context link="owning_copy" field="circ_lib"/>
3192                 </update>
3193                 <delete permission="DELETE_COPY_NOTE">
3194                     <context link="owning_copy" field="circ_lib"/>
3195                 </delete>
3196             </actions>
3197         </permacrud>
3198         </class>
3199         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3200                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3201                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3202                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3203                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3204                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3205                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3206                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3207                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3208                 </fields>
3209                 <links>
3210                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3211                 </links>
3212         </class>
3213         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3214                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3215                         <field name="fingerprint"  reporter:datatype="text"/>
3216                         <field name="id" reporter:datatype="id" />
3217                         <field name="master_record" reporter:datatype="link"/>
3218                         <field name="mods"  reporter:datatype="text"/>
3219                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3220                 </fields>
3221                 <links>
3222                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3223                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3224                 </links>
3225         </class>
3226         <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">
3227                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3228                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3229                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3230                 </fields>
3231                 <links/>
3232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3233             <actions>
3234                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3235                 <retrieve/>
3236                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3237                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3238             </actions>
3239         </permacrud>
3240         </class>
3241         <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">
3242                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3243                         <field name="code"  reporter:datatype="text"/>
3244                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3245                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3246                 </fields>
3247                 <links/>
3248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3249             <actions>
3250                 <create permission="CREATE_PERM" global_required="true"/>
3251                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3252                 <update permission="UPDATE_PERM" global_required="true"/>
3253                 <delete permission="DELETE_PERM" global_required="true"/>
3254             </actions>
3255         </permacrud>
3256         </class>
3257         <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">
3258                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3259                         <field name="id" reporter:datatype="id" />
3260                         <field name="metarecord" reporter:datatype="link"/>
3261                         <field name="source" reporter:datatype="link"/>
3262                 </fields>
3263                 <links>
3264                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3265                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3266                 </links>
3267         </class>
3268         <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">
3269                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3270                         <field name="id" reporter:datatype="id" />
3271                         <field name="field" reporter:datatype="link"/>
3272                         <field name="source" reporter:datatype="link"/>
3273                         <field name="value"  reporter:datatype="text"/>
3274                 </fields>
3275                 <links>
3276                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3277                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3278                 </links>
3279         </class>
3280         <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">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3282                         <field name="id" reporter:datatype="id" />
3283                         <field name="value" reporter:datatype="text"/>
3284                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3285                 </fields>
3286                 <links>
3287                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3288                 </links>
3289         </class>
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3292                         <field name="id" reporter:datatype="id" />
3293                         <field name="entry" reporter:datatype="link"/>
3294                         <field name="def" reporter:datatype="link"/>
3295                         <field name="source" reporter:datatype="link"/>
3296                 </fields>
3297                 <links>
3298                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3299                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3300                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3301                 </links>
3302         </class>
3303         <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">
3304                 <oils_persist:source_definition>
3305                         SELECT * FROM metabib.author_field_entry
3306                                                 UNION ALL
3307                         SELECT * FROM metabib.keyword_field_entry
3308                                                 UNION ALL
3309                         SELECT * FROM metabib.identifier_field_entry
3310                                                 UNION ALL
3311                         SELECT * FROM metabib.title_field_entry
3312                                                 UNION ALL
3313                         SELECT * FROM metabib.subject_field_entry
3314                                                 UNION ALL
3315                         SELECT * FROM metabib.series_field_entry
3316                 </oils_persist:source_definition>
3317                 <fields>
3318                         <field name="field" reporter:datatype="link"/>
3319                         <field name="id" reporter:datatype="id" />
3320                         <field name="source" reporter:datatype="link"/>
3321                         <field name="value"  reporter:datatype="text"/>
3322                 </fields>
3323                 <links>
3324                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3325                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3326                 </links>
3327         </class>
3328         <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">
3329                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3330                         <field name="field" reporter:datatype="link"/>
3331                         <field name="id" reporter:datatype="id" />
3332                         <field name="source" reporter:datatype="link"/>
3333                         <field name="value"  reporter:datatype="text"/>
3334                 </fields>
3335                 <links>
3336                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3337                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3338                 </links>
3339         </class>
3340         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3342                         <field name="accepting_usr" reporter:datatype="link"/>
3343                         <field name="amount" reporter:datatype="money" />
3344                         <field name="amount_collected" reporter:datatype="money" />
3345                         <field name="cash_drawer" reporter:datatype="link"/>
3346                         <field name="id" reporter:datatype="id" />
3347                         <field name="note"  reporter:datatype="text"/>
3348                         <field name="payment_ts" reporter:datatype="timestamp"/>
3349                         <field name="xact" reporter:datatype="link"/>
3350                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3351                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3352                 </fields>
3353                 <links>
3354                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3355                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3356                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3357                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3358                 </links>
3359         </class>
3360         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3361                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3362                         <field name="accepting_usr" reporter:datatype="link"/>
3363                         <field name="amount" reporter:datatype="money" />
3364                         <field name="amount_collected" reporter:datatype="money" />
3365                         <field name="id" reporter:datatype="id" />
3366                         <field name="note"  reporter:datatype="text"/>
3367                         <field name="payment_ts" reporter:datatype="timestamp"/>
3368                         <field name="xact" reporter:datatype="link"/>
3369                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3370                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3371                 </fields>
3372                 <links>
3373                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3374                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3375                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3376                 </links>
3377         </class>
3378         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3379                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3380                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3381                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3384                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3386                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3387                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3388                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3390                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3392                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3393                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3394                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3395                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3396                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3397                 </fields>
3398                 <links>
3399                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3400                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3401                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3402                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3403                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3404                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3405                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3406                 </links>
3407         </class>
3408
3409         <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">
3410                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3411                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3412                         <field name="name"  reporter:datatype="text"/>
3413                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3414                         <field name="block_list" reporter:datatype="text"/>
3415                         <field name="staff_alert" reporter:datatype="bool"/>
3416                         <field name="org_depth" reporter:datatype="int"/>
3417                 </fields>
3418                 <links/>
3419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3420             <actions>
3421                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3422                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3423                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3424                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3425             </actions>
3426         </permacrud>
3427         </class>
3428         <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">
3429                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3430                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3431                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3432                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3433                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3434                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3435                 </fields>
3436                 <links>
3437                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3438                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3439                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3440         </links>
3441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3442             <actions>
3443                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3444                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3445                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3446                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3447             </actions>
3448         </permacrud>
3449         </class>
3450         <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">
3451                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3452                         <field name="holdable" reporter:datatype="bool"/>
3453                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3454                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3455                         <field name="opac_visible" reporter:datatype="bool"/>
3456             <field name="copy_active" reporter:datatype="bool"/>
3457             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3458                 </fields>
3459                 <links/>
3460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3461             <actions>
3462                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3463                 <retrieve/>
3464                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3465                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3466             </actions>
3467         </permacrud>
3468         </class>
3469         <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">
3470                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3471                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3472                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3473                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3474                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3475                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3476                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3477                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3478                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3479                 </fields>
3480                 <links>
3481                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3482                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3483                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3484                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3485                 </links>
3486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3487                         <actions>
3488                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3489                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3490                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3491                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3492                         </actions>
3493                 </permacrud>
3494         </class>
3495         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3496                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3497                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3498                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3499                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3500                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3501                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3502                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3503                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3504                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3505                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3506                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3507                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3508                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3509                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3510                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3511                 </fields>
3512                 <links>
3513                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3514                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3515                 </links>
3516         </class>
3517         <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">
3518                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3519                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3520                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3521                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3522                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3523                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3524                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3525                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3526                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3527                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3528                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3529                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3530                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3531                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3532                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3533                 </fields>
3534                 <links>
3535                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3536                 </links>
3537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3538                         <actions>
3539                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3540                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3541                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3542                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3543                         </actions>
3544                 </permacrud>
3545         </class>
3546
3547
3548         <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">
3549                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3550                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3551                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3552                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3553                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3554                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3555                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3556                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3557                 </fields>
3558                 <links>
3559                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3560                 </links>
3561         </class>
3562
3563         <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">
3564                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3565                         <field name="call_number" />
3566                         <field name="create_date" reporter:datatype="timestamp"/>
3567                         <field name="creator" reporter:datatype="link"/>
3568                         <field name="id" reporter:datatype="id" />
3569                         <field name="pub" reporter:datatype="bool"/>
3570                         <field name="title"  reporter:datatype="text"/>
3571                         <field name="value"  reporter:datatype="text"/>
3572                 </fields>
3573                 <links>
3574                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3575                 </links>
3576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3577             <actions>
3578                 <create permission="CREATE_VOLUME_NOTE">
3579                     <context link="call_number" field="owning_lib"/>
3580                 </create>
3581                 <retrieve permission="VIEW_VOLUME_NOTES">
3582                     <context link="call_number" field="owning_lib"/>
3583                 </retrieve>
3584                 <update permission="UPDATE_VOLUME_NOTE">
3585                     <context link="call_number" field="owning_lib"/>
3586                 </update>
3587                 <delete permission="DELETE_VOLUME_NOTE">
3588                     <context link="call_number" field="owning_lib"/>
3589                 </delete>
3590             </actions>
3591         </permacrud>
3592         </class>
3593         <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">
3594                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3595                         <field name="create_date" reporter:datatype="timestamp"/>
3596                         <field name="creator" reporter:datatype="link"/>
3597                         <field name="edit_date" reporter:datatype="timestamp"/>
3598                         <field name="editor" reporter:datatype="link"/>
3599                         <field name="id" reporter:datatype="id" />
3600                         <field name="record" reporter:datatype="link"/>
3601                         <field name="value" reporter:datatype="text"/>
3602                 </fields>
3603                 <links>
3604                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3605                 </links>
3606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3607             <actions>
3608                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3609                 <retrieve/>
3610                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3611                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3612             </actions>
3613         </permacrud>
3614         </class>
3615         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3616         <oils_persist:source_definition>
3617 SELECT  usr,
3618         SUM(
3619             CASE
3620                 WHEN (
3621                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3622                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3623                 ) THEN 1
3624                 ELSE 0
3625             END
3626         ) AS out,
3627
3628         SUM(
3629             CASE
3630                 WHEN (
3631                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3632                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3633                 ) THEN 1
3634                 ELSE 0
3635             END
3636         ) AS overdue,
3637
3638         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3639         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3640         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3641   FROM  action.circulation
3642   WHERE checkin_time IS NULL
3643   GROUP BY 1
3644         </oils_persist:source_definition>
3645         <fields oils_persist:primary="usr">
3646             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3647             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3648             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3649             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3650             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3651             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3652         </fields>
3653         <links>
3654             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3655         </links>
3656         </class>
3657         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3658         <oils_persist:source_definition>
3659 SELECT  usr,
3660         ARRAY_TO_STRING(ARRAY_ACCUM(
3661             CASE
3662                 WHEN (
3663                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3664                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3665                 ) THEN id
3666                 ELSE 0
3667             END
3668         ),',') AS out,
3669
3670         ARRAY_TO_STRING(ARRAY_ACCUM(
3671             CASE
3672                 WHEN (
3673                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3674                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3675                 ) THEN id
3676                 ELSE 0
3677             END
3678         ),',') AS overdue,
3679
3680         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3681         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3682         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3683   FROM  action.circulation
3684   WHERE checkin_time IS NULL
3685   GROUP BY 1
3686         </oils_persist:source_definition>
3687         <fields oils_persist:primary="usr">
3688             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3689             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3690             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3691             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3692             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3693             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3694         </fields>
3695         <links>
3696             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3697         </links>
3698         </class>
3699         <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">
3700                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3701                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3702                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3703                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3704                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3705                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3706                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3707                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3708                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3709                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3710                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3711                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3712                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3713                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3714                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3715                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3716                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3717                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3718                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3719                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3720                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3721                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3722                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3723                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3724                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3725                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3726                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3727                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3728                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3729                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3730                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3731                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3732                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3734                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3735                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3736                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3737                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3738                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3739                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3740                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3741                 </fields>
3742                 <links>
3743                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3744                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3745                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3746                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3747                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3748                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3749                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3750                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3751                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3752                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3753                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3754                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3755                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3756                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3757                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3758                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3759                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3760                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3761                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3762                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3763                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3764                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3765                 </links>
3766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3767                         <actions>
3768                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3769                         </actions>
3770                 </permacrud>
3771         </class>
3772         <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">
3773                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3774                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3775                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3776                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3777                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3778                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3779                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3780                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3781                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3782                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3783                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3784                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3785                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3786                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3787                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3788                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3789                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3790                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3791                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3792                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3793                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3794                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3795                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3796                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3797                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3798                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3799                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3800                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3801                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3803                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3804                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3805                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3806                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3807                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3808                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3809                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3810                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3811                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3812                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3813                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3814                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3815                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3816                 </fields>
3817                 <links>
3818                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3819                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3820                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3821                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3822                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3823                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3824                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3825                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3826                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3827                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3828                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3829                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3830                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3831                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3832                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3833                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3834                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3835                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3836                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3837                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3838                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3839                 </links>
3840         </class>
3841         <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">
3842                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3843                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3844                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3845                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3846                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3847                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3848                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3849                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3850                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3851                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3852                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3853                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3854                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3855                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3856                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3857                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3858                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3859                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3860                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3861                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3862                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3863                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3864                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3865                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3866                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3867                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3868                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3869                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3870                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3871                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3872                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3873                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3874                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3876                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3877                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3878                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3879                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3880                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3881                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3882                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3883                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3884                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3885                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3886                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3887                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3888                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3889                 </fields>
3890                 <links>
3891                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3892                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3893                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3894                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3895                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3896                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3897                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3898                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3899                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3900                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3901                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3902                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3903                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3904                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3905                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3906                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3907                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3908                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3909                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3910                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3911                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3912                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3913                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3914                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3915                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3916                 </links>
3917         </class>
3918
3919         <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">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3921                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3922                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3923                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3924                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3925                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3926                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3927                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3928                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3929                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3930                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3931                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3934                 </fields>
3935                 <links>
3936                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3937                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3938                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3939                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3940                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3941                 </links>
3942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3943                         <actions>
3944                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3945                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3946                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3947                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3948                         </actions>
3949                 </permacrud>
3950         </class>
3951
3952         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3953                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3954                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3955                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3956                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3957                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3958                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3959                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3960                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3961                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3962                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3963                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3965                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3966                 </fields>
3967                 <links>
3968                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3969                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3970                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3971                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3972                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3973                 </links>
3974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3975                         <actions>
3976                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3977                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3978                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3979                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3980                         </actions>
3981                 </permacrud>
3982         </class>
3983         
3984         <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">
3985                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3986                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3987                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3988                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3989                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3990                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3991                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3992                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3993                 </fields>
3994                 <links>
3995                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3996                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3997                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3998                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3999                 </links>
4000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4001                         <actions>
4002                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4003                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4004                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4005                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4006                         </actions>
4007                 </permacrud>
4008         </class>
4009         
4010         <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">
4011                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4012                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4013                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4014                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4015                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4016                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4017                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4018                 </fields>
4019                 <links>
4020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4021                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4022                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4023                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4024                 </links>
4025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4026                         <actions>
4027                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4028                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4029                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4030                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4031                         </actions>
4032                 </permacrud>
4033         </class>
4034         
4035         <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">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4037                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4038                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4039                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4040                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4041                 </fields>
4042                 <links>
4043                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4044                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4045                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4046                 </links>
4047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4048                         <actions>
4049                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4050                     <context link="resource" field="owner" />
4051                 </create>
4052                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4053                     <context link="resource" field="owner" />
4054                 </retrieve>
4055                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4056                     <context link="resource" field="owner" />
4057                 </update>
4058                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4059                     <context link="resource" field="owner" />
4060                 </delete>
4061                         </actions>
4062                 </permacrud>
4063         </class>
4064         
4065         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4066                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4067                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4068                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4069                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4070                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4071                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4072                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4075                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4076                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4077                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4082                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4084                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4085                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4086                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4087                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4088                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4089                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4090                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4091                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4092                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4093                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4094                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4095                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4096                 </fields>
4097                 <links>
4098                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4099                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4100                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4101                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4102                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4103                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4104                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4105                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4106                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4107                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4108                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4109                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4110                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4111                 </links>
4112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4113                         <actions>
4114                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4115                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4116                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4117                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4118                         </actions>
4119                 </permacrud>
4120         </class>
4121         
4122         <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">
4123                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4124                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4125                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4126                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4127                 </fields>
4128                 <links>
4129                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4130                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4131                 </links>
4132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4133                         <actions>
4134                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4135                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4136                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4137                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4138                         </actions>
4139                 </permacrud>
4140         </class>
4141
4142         <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">
4143                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4144                         <field name="bucket" reporter:datatype="link"/>
4145                         <field name="id" reporter:datatype="id" />
4146                         <field name="target_call_number" reporter:datatype="link" />
4147                         <field name="create_time" reporter:datatype="timestamp" />
4148                         <field name="pos" reporter:datatype="int" />
4149                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4150                 </fields>
4151                 <links>
4152                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4153                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4154             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4155                 </links>
4156         </class>
4157         <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">
4158                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4159                         <field name="id" reporter:datatype="id" />
4160                         <field name="item" reporter:datatype="link"/>
4161                         <field name="note" reporter:datatype="text" />
4162                 </fields>
4163                 <links>
4164                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4165                 </links>
4166         </class>
4167         <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">
4168                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4169                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4170                         <field name="btype" reporter:datatype="text"/>
4171                         <field name="id" reporter:datatype="id" />
4172                         <field name="name" reporter:datatype="text"/>
4173                         <field name="description" reporter:datatype="text"/>
4174                         <field name="owner" reporter:datatype="link"/>
4175                         <field name="pub" reporter:datatype="bool"/>
4176                         <field name="create_time" reporter:datatype="timestamp" />
4177                 </fields>
4178                 <links>
4179                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4180                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4181                 </links>
4182         </class>
4183         <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">
4184                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4185                         <field name="id" reporter:datatype="id" />
4186                         <field name="bucket" reporter:datatype="link"/>
4187                         <field name="note" reporter:datatype="text" />
4188                 </fields>
4189                 <links>
4190                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4191                 </links>
4192         </class>
4193         <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">
4194                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4195                         <field name="hold" reporter:datatype="link"/>
4196                         <field name="id" reporter:datatype="id" />
4197                         <field name="target_copy" reporter:datatype="link"/>
4198                         <field name="proximity" reporter:datatype="number"/>
4199                 </fields>
4200                 <links>
4201                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4202                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4203                 </links>
4204         </class>
4205         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4206                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4207                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4208                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4209                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4210                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4211                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4212                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4213                 </fields>
4214                 <links>
4215                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4216                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4217                 </links>
4218         </class>
4219         <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">
4220                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4221                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4222                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4223                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4224                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4225                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4226                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4227                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4228                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4229                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4230                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4231                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4232                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4233                 </fields>
4234                 <links>
4235                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4236                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4237                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4238                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4239                 </links>
4240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4241             <actions>
4242                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4243                 <retrieve/>
4244                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4245                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4246             </actions>
4247         </permacrud>
4248         </class>
4249         <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">
4250                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4251                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4252                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4253                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4254                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4255             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4256             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4257             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4258                 </fields>
4259                 <links>
4260                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4261                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4262                 </links>
4263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4264             <actions>
4265                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4266                 <retrieve/>
4267                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4268                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4269             </actions>
4270         </permacrud>
4271         </class>
4272         <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">
4273                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4274                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4275             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4276             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4277                 </fields>
4278                 <links>
4279                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4280                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4281                 </links>
4282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4283             <actions>
4284                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4285                                         <context link="lgroup" field="owner" />
4286                 </create>
4287                 <retrieve/>
4288                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4289                                         <context link="lgroup" field="owner" />
4290                 </update>
4291                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4292                                         <context link="lgroup" field="owner" />
4293                 </delete>
4294             </actions>
4295         </permacrud>
4296         </class>
4297
4298     <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">
4299         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4300             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4301             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4302             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4303             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4304         </fields>
4305         <links>
4306             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4307             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4308         </links>
4309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4310             <actions>
4311                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4312                 <retrieve/>
4313                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4314                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4315             </actions>
4316         </permacrud>
4317     </class>
4318
4319         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4320                 <fields>
4321                         <field name="sre_id" oils_persist:virtual="true" />
4322                         <field name="location" oils_persist:virtual="true" />
4323                         <field name="owning_lib" oils_persist:virtual="true" />
4324                         <field name="basic_holdings" oils_persist:virtual="true" />
4325                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4326                         <field name="supplement_holdings" oils_persist:virtual="true" />
4327                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4328                         <field name="index_holdings" oils_persist:virtual="true" />
4329                         <field name="index_holdings_add" oils_persist:virtual="true" />
4330                         <field name="online" oils_persist:virtual="true" />
4331                         <field name="missing" oils_persist:virtual="true" />
4332                         <field name="incomplete" oils_persist:virtual="true" />
4333                 </fields>
4334         </class>
4335
4336         <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">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4338                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4339                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4340                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4342                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4343                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4344                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4345                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4346                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4347                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4348                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4349                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4350                 </fields>
4351                 <links>
4352                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4353                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4354                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4355                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4356                 </links>
4357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4358                         <actions>
4359                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4360                                 <retrieve/>
4361                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4362                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4363                         </actions>
4364                 </permacrud>
4365         </class>
4366
4367         <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">
4368                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4369                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4370                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4371                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4372                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4373                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4375                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4376                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4377                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4380                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4381                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4382                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4383                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4385                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4386                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4387                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4388                 </fields>
4389                 <links>
4390                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4391                 </links>
4392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4393                         <actions>
4394                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4395                                         <context link="subscription" field="owning_lib" />
4396                                 </create>
4397                                 <retrieve />
4398                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4399                                         <context link="subscription" field="owning_lib" />
4400                                 </update>
4401                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4402                                         <context link="subscription" field="owning_lib" />
4403                                 </delete>
4404                         </actions>
4405                 </permacrud>
4406         </class>
4407
4408         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4409                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4411                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4412                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4413                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4414                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4415                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4416                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4419                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4420                 </fields>
4421                 <links>
4422                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4423                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4424                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4425                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4426                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4427                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4428                 </links>
4429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4430                         <actions>
4431                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4432                                 <retrieve />
4433                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4434                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4435                         </actions>
4436                 </permacrud>
4437         </class>
4438
4439         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4441                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4442                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4443                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4444                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4445                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4446                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4447                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4448                 </fields>
4449                 <links>
4450                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4451                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4452                 </links>
4453         </class>
4454
4455         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4456                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4458                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4459                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4460                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4461                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4462                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4463                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4464                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4465                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4466                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4467                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4468                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4469                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4470                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4474                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4475                 </fields>
4476                 <links>
4477                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4478                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4479                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4480                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4481                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4482                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4483                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4484                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4485                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4486                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4487                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4488                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4489                 </links>
4490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4491                         <actions>
4492                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4493                                 <retrieve />
4494                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4495                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4496                         </actions>
4497                 </permacrud>
4498         </class>
4499
4500         <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">
4501                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4503                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4504                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4505                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4506                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4507                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4508                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4509                 </fields>
4510                 <links>
4511                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4512                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4513                 </links>
4514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4515                         <actions>
4516                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4517                                         <context link="distribution" field="holding_lib" />
4518                                 </create>
4519                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4520                                         <context link="distribution" field="holding_lib" />
4521                                 </retrieve>
4522                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4523                                         <context link="distribution" field="holding_lib" />
4524                                 </update>
4525                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4526                                         <context link="distribution" field="holding_lib" />
4527                                 </delete>
4528                         </actions>
4529                 </permacrud>
4530         </class>
4531
4532         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4533                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4534                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4535                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4536                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4537                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4538                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4539                 </fields>
4540                 <links>
4541                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4542                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4543                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4544                 </links>
4545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4546                         <actions>
4547                                 <create permission="ADMIN_SERIAL_STREAM">
4548                                         <context link="distribution" field="holding_lib" />
4549                                 </create>
4550                                 <retrieve />
4551                                 <update permission="ADMIN_SERIAL_STREAM">
4552                                         <context link="distribution" field="holding_lib" />
4553                                 </update>
4554                                 <delete permission="ADMIN_SERIAL_STREAM">
4555                                         <context link="distribution" field="holding_lib" />
4556                                 </delete>
4557                         </actions>
4558                 </permacrud>
4559         </class>
4560
4561         <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">
4562                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4563                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4564                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4565                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4566                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4567                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4568                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4569                 </fields>
4570                 <links>
4571                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4572                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4573                 </links>
4574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4575                         <actions>
4576                                 <create permission="ADMIN_SERIAL_STREAM">
4577                                         <context link="stream" jump="distribution" field="holding_lib" />
4578                                 </create>
4579                                 <retrieve permission="RECEIVE_SERIAL">
4580                                         <context link="stream" jump="distribution" field="holding_lib" />
4581                                 </retrieve>
4582                                 <update permission="ADMIN_SERIAL_STREAM">
4583                                         <context link="stream" jump="distribution" field="holding_lib" />
4584                                 </update>
4585                                 <delete permission="ADMIN_SERIAL_STREAM">
4586                                         <context link="stream" jump="distribution" field="holding_lib" />
4587                                 </delete>
4588                         </actions>
4589                 </permacrud>
4590         </class>
4591
4592         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4593                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4594                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4595                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4596                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4597                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4599                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4600                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4601                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4602                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4603                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4604                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4605                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4606                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4607                 </fields>
4608                 <links>
4609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4610                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4611                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4612                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4613                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4614                 </links>
4615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4616                         <actions>
4617                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4618                                         <context link="subscription" field="owning_lib" />
4619                                 </create>
4620                                 <retrieve/>
4621                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4622                                         <context link="subscription" field="owning_lib" />
4623                                 </update>
4624                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4625                                         <context link="subscription" field="owning_lib" />
4626                                 </delete>
4627                         </actions>
4628                 </permacrud>
4629         </class>
4630
4631         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4632                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4633                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4634                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4635                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4636                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4637                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4638                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4639                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4640                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4641                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4642                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4643                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4644                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4645                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4646                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4647                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4648                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4649                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4650                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4651                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4652                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4653                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4654                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4655                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4656                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4657                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4658                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4659                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4660                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4661                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4662                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4663                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4664                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4665                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4666                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4667                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4668                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4669                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4670                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4674                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4675                 </fields>
4676                 <links>
4677                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4678                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4679                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4680                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4682                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4683                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4684                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4685                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4686                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4687                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4688                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4689                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4690                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4691                 </links>
4692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4693                         <actions>
4694                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4695                                 <retrieve/>
4696                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4697                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4698                         </actions>
4699                 </permacrud>
4700         </class>
4701
4702         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4703                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4704                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4705                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4706                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4707                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4709                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4710                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4711                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4712                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4713                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4715                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4716                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4717                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4718                 </fields>
4719                 <links>
4720                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4722                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4723                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4724                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4725                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4726                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4727                 </links>
4728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4729                         <actions>
4730                                 <create permission="ADMIN_SERIAL_ITEM">
4731                                         <context link="stream" jump="distribution" field="holding_lib" />
4732                                 </create>
4733                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4734                                         <context link="stream" jump="distribution" field="holding_lib" />
4735                                 </retrieve>
4736                                 <update permission="ADMIN_SERIAL_ITEM">
4737                                         <context link="stream" jump="distribution" field="holding_lib" />
4738                                 </update>
4739                                 <delete permission="ADMIN_SERIAL_ITEM">
4740                                         <context link="stream" jump="distribution" field="holding_lib" />
4741                                 </delete>
4742                         </actions>
4743                 </permacrud>
4744         </class>
4745
4746         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4747                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4748                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4749                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4750                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4751                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4752                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4753                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4754                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4755                 </fields>
4756                 <links>
4757                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4758                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4759                 </links>
4760                 <!-- Not available via PCRUD at this time -->
4761         </class>
4762         <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">
4763                 <fields>
4764                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4765                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4766                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4767                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4768                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4769                 </fields>
4770                 <links>
4771                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4772                 </links>
4773         </class>
4774         <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">
4775                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4776                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4777                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4778                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4779                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4780                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4781                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4782                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4783                 </fields>
4784                 <links>
4785                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4786                 </links>
4787         </class>
4788         <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">
4789                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4790                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4791                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4792                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4793                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4794                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4795                 </fields>
4796                 <links>
4797                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4798                 </links>
4799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4800                         <actions>
4801                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4802                                         <context link="distribution" field="holding_lib" />
4803                                 </create>
4804                                 <retrieve/>
4805                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4806                                         <context link="distribution" field="holding_lib" />
4807                                 </update>
4808                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4809                                         <context link="distribution" field="holding_lib" />
4810                                 </delete>
4811                         </actions>
4812                 </permacrud>
4813         </class>
4814
4815         <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">
4816                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4817                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4818                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4819                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4820                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4821                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4822                 </fields>
4823                 <links>
4824                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4825                 </links>
4826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4827                         <actions>
4828                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4829                                         <context link="distribution" field="holding_lib" />
4830                                 </create>
4831                                 <retrieve/>
4832                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4833                                         <context link="distribution" field="holding_lib" />
4834                                 </update>
4835                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4836                                         <context link="distribution" field="holding_lib" />
4837                                 </delete>
4838                         </actions>
4839                 </permacrud>
4840         </class>
4841
4842         <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">
4843                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4844                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4845                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4846                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4847                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4848                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4849                 </fields>
4850                 <links>
4851                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4852                 </links>
4853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4854                         <actions>
4855                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4856                                         <context link="distribution" field="holding_lib" />
4857                                 </create>
4858                                 <retrieve/>
4859                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4860                                         <context link="distribution" field="holding_lib" />
4861                                 </update>
4862                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4863                                         <context link="distribution" field="holding_lib" />
4864                                 </delete>
4865                         </actions>
4866                 </permacrud>
4867         </class>
4868
4869         <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">
4870                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4871                         <field name="id" reporter:datatype="id" />
4872                         <field name="owning_copy" reporter:datatype="link"/>
4873                         <field name="stat_cat" reporter:datatype="link"/>
4874                         <field name="stat_cat_entry" reporter:datatype="link"/>
4875                 </fields>
4876                 <links>
4877                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4878                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4879                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4880                 </links>
4881         </class>
4882         <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">
4883                 <fields oils_persist:primary="code">
4884                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4885                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4886                 </fields>
4887                 <links/>
4888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4889             <actions>
4890                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4891                 <retrieve/>
4892                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4893                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4894             </actions>
4895         </permacrud>
4896         </class>
4897         <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">
4898                 <fields oils_persist:primary="code">
4899                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4900                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4901                 </fields>
4902                 <links/>
4903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4904             <actions>
4905                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4906                 <retrieve/>
4907                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4908                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4909             </actions>
4910         </permacrud>
4911         </class>
4912         <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">
4913                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4914                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4915                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4916                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4917                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4918                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4919                 </fields>
4920                 <links>
4921             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4922         </links>
4923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4924             <actions>
4925                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4926                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4927                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4928                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4929             </actions>
4930         </permacrud>
4931         </class>
4932         <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">
4933                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4934                         <field name="id" reporter:datatype="id" />
4935                         <field name="name" reporter:datatype="text"/>
4936                 </fields>
4937                 <links/>
4938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4939             <actions>
4940                 <create permission="CREATE_LASSO" global_required="true"/>
4941                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4942                 <update permission="UPDATE_LASSO" global_required="true"/>
4943                 <delete permission="DELETE_LASSO" global_required="true"/>
4944             </actions>
4945         </permacrud>
4946         </class>
4947         <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">
4948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4949                         <field name="id" reporter:datatype="id" />
4950                         <field name="lasso" reporter:datatype="link"/>
4951                         <field name="org_unit" reporter:datatype="org_unit"/>
4952                 </fields>
4953                 <links>
4954                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4955                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4956                 </links>
4957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4958             <actions>
4959                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4960                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4961                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4962                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4963             </actions>
4964         </permacrud>
4965         </class>
4966         <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">
4967                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4968                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4969                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4970                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4971                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4972                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4973                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4974                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4975                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4976                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4977                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4978                 </fields>
4979                 <links>
4980                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4983                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4984                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4985                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4986                 </links>
4987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4988             <actions>
4989                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4990                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4991                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4992                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4993             </actions>
4994         </permacrud>
4995         </class>
4996         <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">
4997                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4998                         <field name="id" reporter:datatype="id" />
4999                         <field name="from_org" reporter:datatype="org_unit"/>
5000                         <field name="to_org" reporter:datatype="org_unit"/>
5001                         <field name="prox" reporter:datatype="int" />
5002                 </fields>
5003                 <links>
5004                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5005                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5006                 </links>
5007         </class>
5008         <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">
5009                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5010                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5011                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5012                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5013                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5014                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5015                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5016                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5017                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5018                 </fields>
5019                 <links/>
5020         </class>
5021         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5022                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5023                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5025                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5026                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5027                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5028                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5029                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5030                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5031                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5032                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5033                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5034                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5035                 </fields>
5036                 <links>
5037                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5038                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5039                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5040                 </links>
5041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5042             <actions>
5043                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5044                 <retrieve/>
5045                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5046                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5047             </actions>
5048         </permacrud>
5049         </class>
5050         <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">
5051                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5052                         <field name="address_type"  reporter:datatype="text"/>
5053                         <field name="city"  reporter:datatype="text"/>
5054                         <field name="country"  reporter:datatype="text"/>
5055                         <field name="county"  reporter:datatype="text"/>
5056                         <field name="id" reporter:datatype="id" />
5057                         <field name="org_unit" reporter:datatype="org_unit"/>
5058                         <field name="post_code"  reporter:datatype="text"/>
5059                         <field name="state"  reporter:datatype="text"/>
5060                         <field name="street1"  reporter:datatype="text"/>
5061                         <field name="street2"  reporter:datatype="text"/>
5062                         <field name="valid" reporter:datatype="bool"/>
5063                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5064                 </fields>
5065                 <links>
5066                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5067                 </links>
5068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5069             <actions>
5070                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5071                 <retrieve/>
5072                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5073                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5074             </actions>
5075         </permacrud>
5076         </class>
5077         <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">
5078                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5079                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5080                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5081                         <field name="query_text" reporter:datatype="text"/>
5082                 </fields>
5083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5084             <actions>
5085                 <retrieve/>
5086             </actions>
5087         </permacrud>
5088         </class>
5089
5090         <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">
5091                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5092                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5093                         <field name="owner" reporter:datatype="org_unit"/>
5094                         <field name="code" reporter:datatype="text"/>
5095                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5096                         <field name="create_date" reporter:datatype="timestamp"/>
5097                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5098                 </fields>
5099                 <links>
5100                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5101                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5102                 </links>
5103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5104             <actions>
5105                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5106                 <retrieve/>
5107                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5108                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5109             </actions>
5110         </permacrud>
5111         </class>
5112         <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">
5113                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5114                         <field name="id" reporter:datatype="id"/>
5115                         <field name="grp" reporter:datatype="link"/>
5116                         <field name="pos" reporter:datatype="int"/>
5117                         <field name="query" reporter:datatype="link"/>
5118                 </fields>
5119                 <links>
5120                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5121                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5122                 </links>
5123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5124             <actions>
5125                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5126                     <context link="grp" field="owner"/>
5127                 </create>
5128                 <retrieve/>
5129                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5130                     <context link="grp" field="owner"/>
5131                 </update>
5132                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5133                     <context link="grp" field="owner"/>
5134                 </delete>
5135             </actions>
5136         </permacrud>
5137         </class>
5138
5139         <!-- A note: Please update alhr and ahopl when updating ahr -->
5140         <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">
5141                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5142                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5143                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5144                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5146                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5147                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5149                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5150                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5152                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5153                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5154                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5155                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5156                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5157                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5158                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5159                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5160                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5161                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5162                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5163                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5164                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5165                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5166                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5169                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5172                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5173                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5175                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5176                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5177                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5178                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5179                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5181                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5182                 </fields>
5183                 <links>
5184                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5186                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5187                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5188                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5189                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5190                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5191                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5192                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5193                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5194                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5195                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5196                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5197                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5198                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5199                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5200                 </links>
5201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5202                         <actions>
5203                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5204                         </actions>
5205                 </permacrud>
5206         </class>
5207         <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">
5208                 <oils_persist:source_definition><![CDATA[
5209                 SELECT
5210                         ahr.*,
5211                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5212                                 copy_location_order_position,
5213                         CASE WHEN au.alias IS NOT NULL THEN
5214                                 au.alias
5215                         ELSE
5216                                 au.first_given_name
5217                         END AS usr_alias_or_first_given_name,
5218                         au.first_given_name AS usr_first_given_name,
5219                         au.second_given_name AS usr_second_given_name,
5220                         au.family_name AS usr_family_name,
5221                         au.prefix AS usr_prefix,
5222                         au.suffix AS usr_suffix,
5223                         au.alias AS usr_alias,
5224                         CASE WHEN au.alias IS NOT NULL THEN
5225                                 au.alias
5226                         ELSE
5227                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5228                                         COALESCE(au.family_name, ''),
5229                                         COALESCE(au.suffix, ''),
5230                                         ', ',
5231                                         COALESCE(au.prefix, ''),
5232                                         COALESCE(au.first_given_name, ''),
5233                                         COALESCE(au.second_given_name, '')
5234                                 ], ' '), E'\\s+,', ',')
5235                         END AS usr_alias_or_display_name,
5236                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5237                                 COALESCE(au.family_name, ''),
5238                                 COALESCE(au.suffix, ''),
5239                                 ', ',
5240                                 COALESCE(au.prefix, ''),
5241                                 COALESCE(au.first_given_name, ''),
5242                                 COALESCE(au.second_given_name, '')
5243                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5244                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5245                                 AS call_number_label,
5246                         siss.label AS issuance_label,
5247                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5248                         ahcm_1.copy_count AS potential_copies
5249                 FROM action.hold_request ahr
5250                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5251                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5252                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5253                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5254                 JOIN actor.usr au ON (au.id = ahr.usr)
5255                 JOIN (
5256                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5257                         FROM asset.copy_location
5258                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5259                 LEFT JOIN actor.usr_standing_penalty ausp 
5260                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5261                 LEFT JOIN config.standing_penalty csp
5262                         ON (
5263                                 csp.id = ausp.standing_penalty AND 
5264                                 csp.block_list LIKE '%CAPTURE%' AND (
5265                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5266                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5267                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5268                                         )
5269                                 )
5270                         )
5271                 JOIN (
5272                         SELECT COUNT(target_copy) AS copy_count, hold
5273                         FROM action.hold_copy_map
5274                         GROUP BY 2
5275                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5276                 LEFT JOIN serial.issuance siss
5277                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5278                 LEFT JOIN asset.copy_location_order acplo
5279                         ON (acp.location = acplo.location AND
5280                                 acp.circ_lib = acplo.org)
5281                 WHERE
5282                         ahr.capture_time IS NULL AND
5283                         ahr.cancel_time IS NULL AND
5284                         csp.id IS NULL AND
5285                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5286                 ]]></oils_persist:source_definition>
5287                 <fields oils_persist:primary="id">
5288                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5289                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5290                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5291                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5292                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5293                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5294                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5295                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5296                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5297                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5298                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5299                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5300                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5301                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5302                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5303                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5304                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5305                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5306                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5307                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5308                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5309                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5310                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5311                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5312                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5315                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5319                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5321                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5322                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5323                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5324                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5325                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5327                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5328                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5329                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5330                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5331                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5332                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5333                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5334                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5335                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5336                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5337                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5338                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5339                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5340                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5341                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5342                 </fields>
5343                 <links>
5344                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5346                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5347                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5348                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5349                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5350                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5351                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5352                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5353                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5354                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5355                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5356                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5357                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5358                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5359                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5360                 </links>
5361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5362                         <actions>
5363                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5364                         </actions>
5365                 </permacrud>
5366         </class>
5367         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5368                 <oils_persist:source_definition>
5369                         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)
5370                 </oils_persist:source_definition>
5371                 <fields oils_persist:primary="id">
5372                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5373                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5374                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5375                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5376                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5377                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5378                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5379                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5380                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5381                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5382                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5383                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5384                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5385                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5386                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5387                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5388                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5389                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5390                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5391                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5392                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5393                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5394                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5395                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5396                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5397                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5398                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5399                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5400                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5401                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5403                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5404                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5405                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5406                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5407                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5408                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5409                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5410                 </fields>
5411                 <links>
5412                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5413                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5414                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5415                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5416                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5417                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5418                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5419                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5420                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5421                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5422                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5423                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5424                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5425                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5426                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5427                 </links>
5428         </class>
5429
5430         <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">
5431                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5432                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5433                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5434                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5435                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5436                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5437                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5438                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5439                 </fields>
5440                 <links>
5441                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5442                 </links>
5443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5444                         <actions>
5445                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5446                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5447                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5448                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5449                         </actions>
5450                 </permacrud>
5451         </class>
5452         <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">
5453                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5454                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5455                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5456                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5457                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5458                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5459                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5460                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5461                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5462                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5463                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5464                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5465                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5466                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5467                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5468                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5469                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5470                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5471                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5472                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5473                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5474                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5475                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5476                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5477                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5478                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5479                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5480                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5481                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5482                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5483                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5485                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5486                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5487                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5488                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5489                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5490                 </fields>
5491                 <links>
5492                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5493                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5494                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5496                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5497                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5498                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5499                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5500                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5501                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5502                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5503                 </links>
5504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5505                         <actions>
5506                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5507                         </actions>
5508                 </permacrud>
5509         </class>
5510         <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">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5512                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5513                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5514                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5515                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5516                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5517                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5518                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5519                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5520                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5521                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5522                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5523                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5524                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5525                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5526                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5528                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5530                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5531                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5532                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5533                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5534                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5535                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5536                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5537                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5540                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5543                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5544                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5545                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5546                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5547                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5548                 </fields>
5549                 <links>
5550                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5551                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5552                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5553                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5555                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5557                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5558                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5559                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5560                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5561                 </links>
5562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5563                         <actions>
5564                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5565                         </actions>
5566                 </permacrud>
5567         </class>
5568
5569         <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">
5570                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5571                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5572                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5573                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5574                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5575                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5576                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5577                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5578                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5579                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5580                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5581                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5582                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5583                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5584                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5585                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5586                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5587                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5588                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5589                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5590                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5601                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5602                 </fields>
5603                 <links>
5604                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5605                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5606                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5607                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5608                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5609                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5610                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5611                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5612                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5613                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5614                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5615                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5616                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5617                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5618                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5619                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5620                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5621                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5622                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5623                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5624                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5625                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5626                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5627                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5628                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5629                 </links>
5630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5631             <actions>
5632                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5633                 <retrieve />
5634                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5635                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5636             </actions>
5637         </permacrud>
5638         </class>
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5641                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5642                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5643                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5644                 </fields>
5645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5646                         <actions>
5647                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5648                                 <retrieve/>
5649                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5650                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5651                         </actions>
5652                 </permacrud>
5653         </class>
5654         <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">
5655                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5656                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5657                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5658                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5659                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5660                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5661                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5662                 </fields>
5663                 <links>
5664                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5665                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5666                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5667                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5668                 </links>
5669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5670                         <actions>
5671                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5672                                 <retrieve/>
5673                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5674                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5675                         </actions>
5676                 </permacrud>
5677         </class>
5678         <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">
5679                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5680                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5681                         <field name="btype" reporter:datatype="text"/>
5682                         <field name="id" reporter:datatype="id" />
5683                         <field name="name"  reporter:datatype="text"/>
5684                         <field name="description" reporter:datatype="text"/>
5685                         <field name="owner" reporter:datatype="link"/>
5686                         <field name="pub" reporter:datatype="bool"/>
5687                         <field name="create_time" reporter:datatype="timestamp" />
5688                 </fields>
5689                 <links>
5690                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5691                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5692                 </links>
5693         </class>
5694         <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">
5695                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5696                         <field name="id" reporter:datatype="id" />
5697                         <field name="bucket" reporter:datatype="link"/>
5698                         <field name="note" reporter:datatype="text" />
5699                 </fields>
5700                 <links>
5701                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5702                 </links>
5703         </class>
5704         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5705                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5706                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5707                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5708                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5709                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5710                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5711                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5712                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5713                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5714                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5715                 </fields>
5716                 <links>
5717                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5718                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5719                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5720                 </links>
5721         </class>
5722         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5723                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5724                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5725                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5726                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5727                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5728                 </fields>
5729                 <links>
5730                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5731                 </links>
5732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5733                         <actions>
5734                                 <retrieve permission="VIEW_USER">
5735                                         <context link="usr" field="home_ou" />
5736                                 </retrieve>
5737                         </actions>
5738                 </permacrud>
5739         </class>
5740     <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">
5741         <fields oils_persist:primary="field">
5742             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5743             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5744             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5745         </fields>
5746         <links/>
5747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5748             <actions>
5749                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5750                 <retrieve />
5751                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5752                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5753             </actions>
5754         </permacrud>
5755     </class>
5756         <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">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5758                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5759                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5760                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5761                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5762                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5763                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5764                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5765                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5766                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5767                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5768                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5769                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5770                 </fields>
5771                 <links>
5772                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5773                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5774                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5775                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5776                 </links>
5777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5778             <actions>
5779                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5780                 <retrieve />
5781                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5782                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5783             </actions>
5784         </permacrud>
5785         </class>
5786         <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">
5787                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5788                         <field name="field" reporter:datatype="link"/>
5789                         <field name="id" reporter:datatype="id" />
5790                         <field name="source" reporter:datatype="link"/>
5791                         <field name="value"  reporter:datatype="text"/>
5792                 </fields>
5793                 <links>
5794                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5795                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5796                 </links>
5797         </class>
5798         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5799                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5800                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5801                         <field name="btype" reporter:datatype="text"/>
5802                         <field name="id" reporter:datatype="id" />
5803                         <field name="name"  reporter:datatype="text"/>
5804                         <field name="description" reporter:datatype="text"/>
5805                         <field name="owner" reporter:datatype="link"/>
5806                         <field name="pub" reporter:datatype="bool"/>
5807                         <field name="create_time" reporter:datatype="timestamp" />
5808                 </fields>
5809                 <links>
5810                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5811                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5812                 </links>
5813         </class>
5814         <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">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5816                         <field name="id" reporter:datatype="id" />
5817                         <field name="bucket" reporter:datatype="link"/>
5818                         <field name="note" reporter:datatype="text" />
5819                 </fields>
5820                 <links>
5821                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5822                 </links>
5823         </class>
5824         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5825                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5826                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5827                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5828                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5829                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5830                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5831                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5832                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5833                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5834                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5835                 </fields>
5836                 <links>
5837                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5838                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5839                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5840                 </links>
5841         </class>
5842         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5843                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5844                         <field name="id" reporter:datatype="id" />
5845                         <field name="ind1" />
5846                         <field name="ind2" />
5847                         <field name="record" />
5848                         <field name="subfield" />
5849                         <field name="tag" />
5850                         <field name="value" />
5851                 </fields>
5852                 <links>
5853                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5854                 </links>
5855         </class>
5856         <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">
5857                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5858                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5859                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
5860                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
5861                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
5862                 </fields>
5863                 <links>
5864                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
5865                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
5866                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
5867                 </links>
5868         </class>
5869         <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">
5870                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5871                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5872                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5873                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5874                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5875                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5876                 </fields>
5877                 <links>
5878                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5879                 </links>
5880         </class>
5881         <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">
5882                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5883                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5884                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5885                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5886                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5887                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5888                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5889                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5890                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5891                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5892                 </fields>
5893                 <links>
5894                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5895                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5896                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5897                 </links>
5898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5899             <actions>
5900                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5901                 <retrieve/>
5902                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5903                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5904             </actions>
5905         </permacrud>
5906         </class>
5907         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5908                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5909                         <field name="create_date" reporter:datatype="timestamp"/>
5910                         <field name="creator" reporter:datatype="link"/>
5911                         <field name="edit_date" reporter:datatype="timestamp"/>
5912                         <field name="editor" reporter:datatype="link"/>
5913                         <field name="id" reporter:datatype="id" />
5914                         <field name="pub" reporter:datatype="bool"/>
5915                         <field name="record" reporter:datatype="link"/>
5916                         <field name="value"  reporter:datatype="text"/>
5917                 </fields>
5918                 <links>
5919                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5920                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5921                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5922                 </links>
5923         </class>
5924         <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">
5925                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5926                         <field name="balance_owed" reporter:datatype="money" />
5927                         <field name="total_owed" reporter:datatype="money" />
5928                         <field name="total_paid" reporter:datatype="money" />
5929                         <field name="usr" reporter:datatype="link"/>
5930                 </fields>
5931                 <links>
5932                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5933                 </links>
5934         </class>
5935         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5936                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5937                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5938                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5939                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5940                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5941                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5942                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5943                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5944                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5945                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5946                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5947                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5948                 </fields>
5949                 <links>
5950                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5951                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5952                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5953                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5954                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5955                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5956                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5957                 </links>
5958         </class>
5959         <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">
5960                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5961                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5962                         <field name="quality" reporter:datatype="int" />
5963                         <field name="source" reporter:datatype="text"/>
5964                         <field name="transcendant" reporter:datatype="bool"/>
5965                         <field name="can_have_copies" reporter:datatype="bool"/>
5966                 </fields>
5967                 <links/>
5968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5969             <actions>
5970                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5971                 <retrieve/>
5972                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5973                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5974             </actions>
5975         </permacrud>
5976         </class>
5977         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5979                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5980                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5981                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5982                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5983                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5984                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5985                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5986                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5987                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5988                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5989                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5990                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5991                 </fields>
5992                 <links>
5993                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5994                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5995                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5996                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5997                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5998                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5999                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6000                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6001                 </links>
6002         </class>
6003         <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">
6004                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6005                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6006                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6007                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6008                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6009                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6010                 </fields>
6011                 <links>
6012                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6013                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6014                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6015                 </links>
6016         </class>
6017         <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">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6019                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6020                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6021                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6022                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6023                 </fields>
6024                 <links>
6025                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6026                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6027                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6028                 </links>
6029         </class>
6030         <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">
6031                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6032                         <field name="bucket" reporter:datatype="link"/>
6033                         <field name="id" reporter:datatype="id" />
6034                         <field name="target_user" reporter:datatype="link"/>
6035                         <field name="create_time" reporter:datatype="timestamp" />
6036                         <field name="pos" reporter:datatype="int" />
6037                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6038                 </fields>
6039                 <links>
6040                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6041                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6042             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6043                 </links>
6044         </class>
6045         <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">
6046                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6047                         <field name="id" reporter:datatype="id" />
6048                         <field name="item" reporter:datatype="link"/>
6049                         <field name="note" reporter:datatype="text" />
6050                 </fields>
6051                 <links>
6052                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6053                 </links>
6054         </class>
6055         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6056                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6057                         <field name="balance_owed" reporter:datatype="money" />
6058                         <field name="total_owed" reporter:datatype="money" />
6059                         <field name="total_paid" reporter:datatype="money" />
6060                         <field name="usr" reporter:datatype="link"/>
6061                 </fields>
6062                 <links>
6063                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6064                 </links>
6065         </class>
6066         <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">
6067                 <fields oils_persist:primary="code" oils_persist:sequence="">
6068                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6069                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6070                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6071                 </fields>
6072                 <links/>
6073         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6074             <actions>
6075                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6076                 <retrieve/>
6077                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6078                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6079             </actions>
6080         </permacrud>
6081         </class>
6082         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6083                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6084                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6085                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6086                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6087                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6088                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6089                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6090                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6091                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6093                 </fields>
6094                 <links>
6095                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6096                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6097                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6098                 </links>
6099         </class>
6100         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6102                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6103                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6104                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6105                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6106                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6107                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6109                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6110                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6111                 </fields>
6112                 <links>
6113                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6114                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6115                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6116                 </links>
6117         </class>
6118         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6119                 <fields oils_persist:primary="id" oils_persist:sequence="">
6120                         <field name="checkin_lib" reporter:datatype="link"/>
6121                         <field name="checkin_staff" reporter:datatype="link"/>
6122                         <field name="checkin_time" reporter:datatype="timestamp"/>
6123                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6124                         <field name="circ_staff" reporter:datatype="link"/>
6125                         <field name="desk_renewal" reporter:datatype="bool"/>
6126                         <field name="due_date" reporter:datatype="timestamp"/>
6127                         <field name="duration" reporter:datatype="interval"/>
6128                         <field name="duration_rule" reporter:datatype="link"/>
6129                         <field name="fine_interval" reporter:datatype="interval"/>
6130                         <field name="id" reporter:datatype="id" />
6131                         <field name="max_fine" reporter:datatype="money" />
6132                         <field name="max_fine_rule" reporter:datatype="link"/>
6133                         <field name="opac_renewal" reporter:datatype="bool"/>
6134                         <field name="phone_renewal" reporter:datatype="bool"/>
6135                         <field name="recurring_fine" reporter:datatype="money" />
6136                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6137                         <field name="renewal_remaining" reporter:datatype="int" />
6138             <field name="grace_period" reporter:datatype="interval" />
6139                         <field name="stop_fines" reporter:datatype="text"/>
6140                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6141                         <field name="target_copy" reporter:datatype="link"/>
6142                         <field name="usr" reporter:datatype="link"/>
6143                         <field name="xact_finish" reporter:datatype="timestamp" />
6144                         <field name="xact_start" reporter:datatype="timestamp" />
6145                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6146                 </fields>
6147                 <links>
6148                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6149                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6150                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6151                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6152                 </links>
6153         </class>
6154         <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">
6155                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6156                         <field name="field" reporter:datatype="link"/>
6157                         <field name="id" reporter:datatype="id" />
6158                         <field name="source" reporter:datatype="link"/>
6159                         <field name="value" reporter:datatype="text"/>
6160                 </fields>
6161                 <links>
6162                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6163                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6164                 </links>
6165         </class>
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6168                         <field name="high" reporter:datatype="money" />
6169                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6170                         <field name="low" reporter:datatype="money" />
6171                         <field name="name" reporter:datatype="text"/>
6172                         <field name="normal" reporter:datatype="money" />
6173                         <field name="recurrence_interval" reporter:datatype="interval"/>
6174             <field name="grace_period" reporter:datatype="interval" />
6175                 </fields>
6176                 <links/>
6177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6178             <actions>
6179                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6180                 <retrieve/>
6181                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6182                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6183             </actions>
6184         </permacrud>
6185         </class>
6186         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6188                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6189                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6190                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6191                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6192                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6193                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6194                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6195                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6196                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6197                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6198                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6199                 </fields>
6200                 <links>
6201                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6202                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6203                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6204                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6205                 </links>
6206         </class>
6207         <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">
6208                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6209                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6210                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6211                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6212                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6213                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6214                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6215                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6216                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6217                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6218                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6219                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6220                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6221                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6222                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6223                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6224                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6225                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6226                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6227                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6228                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6229                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6230                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6231                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6232                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6233                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6234                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6235                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6236                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6237                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6238                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6239                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6240                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6241                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6242                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6243                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6244                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6245                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6246                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6247                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6248                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6249                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6250                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6251                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6252                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6253                 </fields>
6254                 <links>
6255                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6256                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6257                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6258                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6260                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6261                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6262                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6263                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6264                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6265                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6266                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6267                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6268                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6269                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6270                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6271                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6272                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6273                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6274                 </links>
6275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6276             <actions>
6277                 <create permission="CREATE_COPY">
6278                     <context link="call_number" field="owning_lib"/>
6279                 </create>
6280                 <retrieve/>
6281                 <update permission="UPDATE_COPY">
6282                     <context link="call_number" field="owning_lib"/>
6283                 </update>
6284                 <delete permission="DELETE_COPY">
6285                     <context link="call_number" field="owning_lib"/>
6286                 </delete>
6287             </actions>
6288         </permacrud>
6289         </class>
6290
6291         <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">
6292                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6293                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6294                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6295                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6296                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6297                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6298                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6299                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6300                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6301                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6302                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6303                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6304                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6305                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6306                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6307                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6308                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6309                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6310                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6311                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6312                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6313                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6314                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6315                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6316                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6317                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6318                 </fields>
6319                 <links>
6320                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6321                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6322                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6323                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6324                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6325                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6326                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6327                 </links>
6328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6329                         <actions>
6330                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6331                                 <retrieve />
6332                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6333                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6334                         </actions>
6335                 </permacrud>
6336         </class>
6337
6338         <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">
6339                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6340                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6341                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6342                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6343                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6344                 </fields>
6345                 <links/>
6346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6347             <actions>
6348                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6349                 <retrieve/>
6350                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6351                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6352             </actions>
6353         </permacrud>
6354         </class>
6355         <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">
6356                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6357                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6358                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6359                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6360                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6361                 </fields>
6362                 <links/>
6363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364             <actions>
6365                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6366                 <retrieve/>
6367                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6368                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6369             </actions>
6370         </permacrud>
6371         </class>
6372         <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">
6373                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6374                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6375                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6376                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6377                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6378                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6379                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6380                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6381                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6382                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6383                 </fields>
6384                 <links>
6385                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6386                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6387                 </links>
6388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6389             <actions>
6390                 <create permission="CREATE_PERM" global_required="true"/>
6391                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6392                 <update permission="UPDATE_PERM" global_required="true"/>
6393                 <delete permission="DELETE_PERM" global_required="true"/>
6394             </actions>
6395         </permacrud>
6396         </class>
6397         <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">
6398                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6399                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6400                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6401                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6402                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6403                 </fields>
6404                 <links>
6405                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6406                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6407                 </links>
6408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6409             <actions>
6410                 <create permission="ADMIN_SURVEY">
6411                     <context link="question" jump="survey" field="owner"/>
6412                 </create>
6413                 <retrieve/>
6414                 <update permission="ADMIN_SURVEY">
6415                     <context link="question" jump="survey" field="owner"/>
6416                 </update>
6417                 <delete permission="ADMIN_SURVEY">
6418                     <context link="question" jump="survey" field="owner"/>
6419                 </delete>
6420             </actions>
6421         </permacrud>
6422         </class>
6423         <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">
6424                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6425                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6426                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6427                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6428                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6429                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6430                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6431                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6432                 </fields>
6433                 <links>
6434                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6435                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6436                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6437                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6438                 </links>
6439         </class>
6440         <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">
6441                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6442                         <field name="balance_owed" reporter:datatype="money" />
6443                         <field name="total_owed" reporter:datatype="money" />
6444                         <field name="total_paid" reporter:datatype="money" />
6445                         <field name="usr" reporter:datatype="link"/>
6446                 </fields>
6447                 <links>
6448                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6449                 </links>
6450         </class>
6451         <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">
6452                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6453                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6454                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6455                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6456                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6457                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6458                 </fields>
6459                 <links>
6460                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6461                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6462                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6463                 </links>
6464         </class>
6465         <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">
6466                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6467                         <field name="field" reporter:datatype="link"/>
6468                         <field name="id" reporter:datatype="id" />
6469                         <field name="source" reporter:datatype="link"/>
6470                         <field name="value" reporter:datatype="text"/>
6471                 </fields>
6472                 <links>
6473                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6474                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6475                 </links>
6476         </class>
6477         <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">
6478                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6479                         <field name="field" reporter:datatype="link"/>
6480                         <field name="id" reporter:datatype="id" />
6481                         <field name="source" reporter:datatype="link"/>
6482                         <field name="value" reporter:datatype="text"/>
6483                 </fields>
6484                 <links>
6485                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6486                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6487                 </links>
6488         </class>
6489         <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">
6490                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6491                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6492                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6493                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6494                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6495                 </fields>
6496                 <links>
6497                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6498                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6499                 </links>
6500         </class>
6501         <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">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6503                         <field name="depth" reporter:datatype="int" />
6504                         <field name="grantable" reporter:datatype="bool"/>
6505                         <field name="grp" reporter:datatype="link"/>
6506                         <field name="id" reporter:datatype="id" />
6507                         <field name="perm" reporter:datatype="link"/>
6508                 </fields>
6509                 <links>
6510                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6511                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6512                 </links>
6513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6514             <actions>
6515                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6516                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6517                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6518                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6519             </actions>
6520         </permacrud>
6521         </class>
6522         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6523                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6524                         <field name="items" oils_persist:virtual="true" />
6525                         <field name="btype" reporter:datatype="text"/>
6526                         <field name="id" reporter:datatype="id" />
6527                         <field name="name" reporter:datatype="text"/>
6528                         <field name="description" reporter:datatype="text"/>
6529                         <field name="owner" reporter:datatype="link"/>
6530                         <field name="pub" reporter:datatype="bool"/>
6531                         <field name="create_time" reporter:datatype="timestamp" />
6532                 </fields>
6533                 <links>
6534                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6535                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6536                 </links>
6537         </class>
6538         <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">
6539                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6540                         <field name="id" reporter:datatype="id" />
6541                         <field name="bucket" reporter:datatype="link"/>
6542                         <field name="note" reporter:datatype="text" />
6543                 </fields>
6544                 <links>
6545                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6546                 </links>
6547         </class>
6548         <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">
6549                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6550                         <field name="id" reporter:datatype="int" />
6551                         <field name="usr" reporter:datatype="link"/>
6552                         <field name="work_ou" reporter:datatype="link"/>
6553                 </fields>
6554                 <links>
6555                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6556                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6557                 </links>
6558         </class>
6559         <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">
6560                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6561                         <field name="depth" reporter:datatype="int"/>
6562                         <field name="grantable" reporter:datatype="bool"/>
6563                         <field name="id" reporter:datatype="id" />
6564                         <field name="perm" reporter:datatype="link"/>
6565                         <field name="usr" reporter:datatype="link"/>
6566                 </fields>
6567                 <links>
6568                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6569                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6570                 </links>
6571         </class>
6572         <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">
6573                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6574                         <field name="object_id" reporter:datatype="text"/>
6575                         <field name="grantable" reporter:datatype="bool"/>
6576                         <field name="id" reporter:datatype="id" />
6577                         <field name="perm" reporter:datatype="link"/>
6578                         <field name="usr" reporter:datatype="link"/>
6579                         <field name="object_type" reporter:datatype="text"/>
6580                 </fields>
6581                 <links>
6582                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6583                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6584                 </links>
6585         </class>
6586         <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">
6587                 <fields oils_persist:primary="id" oils_persist:sequence="">
6588                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6589                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6590                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6591                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6592                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6593                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6594                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6595                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6596                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6597                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6598                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6599                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6600                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6601                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6602                 </fields>
6603                 <links>
6604                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6605                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6606                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6607                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6608                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6609                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6610                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6611                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6612                 </links>
6613         </class>
6614         <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">
6615                 <fields oils_persist:primary="id" oils_persist:sequence="">
6616                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6617                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6618                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6619                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6620                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6621                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6622                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6623                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6624                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6625                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6626                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6627                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6628                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6629                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6630                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6631                 </fields>
6632                 <links>
6633                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6634                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6635                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6636                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6637                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6638                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6639                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6640                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6641                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6642                 </links>
6643         </class>
6644         <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">
6645                 <fields oils_persist:primary="id" oils_persist:sequence="">
6646                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6647                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6648                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6649                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6650                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6651                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6652                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6653                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6654                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6655                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6656                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6657                 </fields>
6658                 <links>
6659                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6660                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6661                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6662                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6663                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6664                 </links>
6665         </class>
6666         <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">
6667                 <fields oils_persist:primary="id" oils_persist:sequence="">
6668                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6669                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6670                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6671                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6672                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6673                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6674                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6675                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6676                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6677                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6678                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6679                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6680                 </fields>
6681                 <links>
6682                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6683                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6684                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6685                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6686                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6687                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6688                 </links>
6689         </class>
6690         <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">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6692                         <field name="bucket" reporter:datatype="link"/>
6693                         <field name="id" reporter:datatype="id" />
6694                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6695                         <field name="create_time" reporter:datatype="timestamp" />
6696                         <field name="pos" reporter:datatype="int" />
6697                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6698                 </fields>
6699                 <links>
6700                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6701                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6702             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6703                 </links>
6704         </class>
6705         <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">
6706                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6707                         <field name="id" reporter:datatype="id" />
6708                         <field name="item" reporter:datatype="link"/>
6709                         <field name="note" reporter:datatype="text" />
6710                 </fields>
6711                 <links>
6712                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6713                 </links>
6714         </class>
6715         <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">
6716                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6717                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6718                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6719                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6720                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6721                 </fields>
6722                 <links>
6723                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6724                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6725                 </links>
6726         </class>
6727     <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">
6728         <fields oils_persist:primary="field">
6729             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6730             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6731             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6732         </fields>
6733         <links/>
6734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6735             <actions>
6736                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6737                 <retrieve />
6738                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6739                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6740             </actions>
6741         </permacrud>
6742     </class>
6743         <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">
6744                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6745                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6746                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6747                 </fields>
6748                 <links/>
6749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6750             <actions>
6751                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6752                 <retrieve/>
6753                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6754                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6755             </actions>
6756         </permacrud>
6757         </class>
6758
6759
6760         <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">
6761                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6762                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6763                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6764                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6765                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6766                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6767                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6768                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6769                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6770                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6771                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6772                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6774                 </fields>
6775                 <links>
6776                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6777                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6778                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6779                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6780                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6781                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6782                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6783                 </links>
6784         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6785             <actions>
6786                 <create permission="TRANSIT_COPY">
6787                     <context link="target_copy" field="owner"/>
6788                 </create>
6789                 <retrieve/>
6790                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6791                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6792             </actions>
6793         </permacrud>
6794         </class>
6795         <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">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6797                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6798                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6799                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6800                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6801                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6802                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6803                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6804                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6805                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6806                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6807                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6808                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6809                 </fields>
6810                 <links>
6811                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6812                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6813                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6814                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6815                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6816                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6817                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6818                 </links>
6819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6820             <actions>
6821                 <create permission="TRANSIT_COPY" context_field="owner">
6822                     <context link="target_copy" field="circ_lib"/>
6823                 </create>
6824                 <retrieve/>
6825                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6826                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6827             </actions>
6828         </permacrud>
6829         </class>
6830         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6831                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6832                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6833                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6834                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6835                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6836                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6837                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6838                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6839                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6840                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6841                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6842                 </fields>
6843                 <links>
6844                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6845                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6846                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6847                 </links>
6848         </class>
6849         <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">
6850                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6851                         <field name="grp" />
6852                         <field name="id" reporter:datatype="id" />
6853                         <field name="usr" />
6854                 </fields>
6855                 <links>
6856                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6857                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6858                 </links>
6859         </class>
6860         <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">
6861                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6862                         <field name="id" reporter:datatype="id" />
6863                         <field name="fq_field" reporter:datatype="text"/>
6864                         <field name="identity_value" reporter:datatype="text"/>
6865                         <field name="translation" reporter:datatype="text"/>
6866                         <field name="string" reporter:datatype="text"/>
6867                 </fields>
6868                 <links>
6869                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6870                 </links>
6871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6872             <actions>
6873                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6874                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6875                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6876                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6877             </actions>
6878         </permacrud>
6879         </class>
6880         <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">
6881                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6882                         <field name="id" reporter:datatype="id" />
6883                         <field name="fm_class" reporter:datatype="text"/>
6884                         <field name="field" reporter:datatype="text"/>
6885                         <field name="owner" reporter:datatype="org_unit"/>
6886                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6887                 </fields>
6888                 <links>
6889                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6890                 </links>
6891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6892             <actions>
6893                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6894                 <retrieve/>
6895                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6896                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6897             </actions>
6898         </permacrud>
6899         </class>
6900         <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">
6901                 <fields oils_persist:primary="code">
6902                         <field name="code" reporter:datatype="id" />
6903                         <field name="marc_code" reporter:datatype="text"/>
6904                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6905                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6906                 </fields>
6907                 <links/>
6908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6909             <actions>
6910                 <create permission="CREATE_LOCALE" global_required="true"/>
6911                 <retrieve/>
6912                 <update permission="UPDATE_LOCALE" global_required="true"/>
6913                 <delete permission="DELETE_LOCALE" global_required="true"/>
6914             </actions>
6915         </permacrud>
6916         </class>
6917         <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">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6919                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6920                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6921                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6922             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6923                 </fields>
6924                 <links>
6925                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6926                 </links>
6927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928             <actions>
6929                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6930                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6931                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6932                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6933             </actions>
6934         </permacrud>
6935         </class>
6936
6937         <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">
6938                 <fields oils_persist:primary="id">
6939                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6940                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6941                 </fields>
6942                 <links/>
6943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6944             <actions>
6945                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6946                 <retrieve/>
6947                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6948                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6949             </actions>
6950         </permacrud>
6951         </class>
6952
6953         <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">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6955                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6956                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6957                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6958                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6959                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6960                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6961                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6962                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6963                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6964                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6965                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6966                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6967                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6968                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6969                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6970                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6971                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6972                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6973                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6974                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6975                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6976                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6977                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6978                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6979                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6980                 </fields>
6981                 <links>
6982                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6983                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6984                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6985                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6986                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6987                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6988                 </links>
6989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6990             <actions>
6991                 <create permission="user_request.create">
6992                     <context link="usr" field="home_ou"/>
6993                                 </create>
6994                 <retrieve permission="user_request.view">
6995                     <context link="usr" field="home_ou"/>
6996                                 </retrieve>
6997                 <update permission="user_request.update">
6998                     <context link="usr" field="home_ou"/>
6999                                 </update>
7000                 <delete permission="user_request.delete">
7001                     <context link="usr" field="home_ou"/>
7002                                 </delete>
7003             </actions>
7004         </permacrud>
7005         </class>
7006
7007         <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">
7008                 <fields oils_persist:primary="code">
7009                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7010                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7011                 </fields>
7012                 <links/>
7013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7014             <actions>
7015                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7016                 <retrieve/>
7017                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7018                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7019             </actions>
7020         </permacrud>
7021         </class>
7022
7023         <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">
7024                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7025                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7026                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7027                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7028                         <field reporter:label="Ratio" name="ratio" />
7029                 </fields>
7030                 <links>
7031                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7032                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7033                 </links>
7034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7035                         <actions>
7036                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7037                                 <retrieve/>
7038                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7039                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7040                         </actions>
7041                 </permacrud>
7042         </class>
7043
7044         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7045                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7046                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7047                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7048                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7049                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7050                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7051                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7052                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7053                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7054                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7055                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7056                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7057                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7058                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7059                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7060                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7061                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7062                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7063                 </fields>
7064                 <links>
7065                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7066                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7067             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7068             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7069             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7070                 </links>
7071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7072             <actions>
7073                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7074                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7075                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7076                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7077             </actions>
7078         </permacrud>
7079         </class>
7080
7081         <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">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7083                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7084                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7085                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7086                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7087                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7088                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7089                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7090                 </fields>
7091                 <links>
7092                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7093                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7094                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7095                 </links>
7096         </class>
7097
7098         <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">
7099                 <fields oils_persist:primary="code">
7100                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7101                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7102                 </fields>
7103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7104             <actions>
7105                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7106                 <retrieve/>
7107                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7108                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7109             </actions>
7110                 </permacrud>
7111         </class>
7112
7113         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7114                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7115                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7116                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7117                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7118                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7119                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7120                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7121                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7122                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7123                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7124                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7125                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7126                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7127                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7128                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7129                 </fields>
7130                 <links>
7131                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7132                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7133                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7134                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7135                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7136                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7137                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7138                 </links>
7139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7140             <actions>
7141                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7142                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7143                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7144                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7145             </actions>
7146         </permacrud>
7147         </class>
7148
7149         <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">
7150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7151                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7152                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7153                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7154                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7155                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7156                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7157                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7158                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7159                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7160                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7161                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7162                 </fields>
7163                 <links>
7164                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7165                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7166                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7167                 </links>
7168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7169             <actions>
7170                 <create   permission="ADMIN_INVOICE">
7171                                         <context link="invoice" field="receiver"/>
7172                                 </create>
7173                 <retrieve permission="ADMIN_INVOICE">
7174                                         <context link="invoice" field="receiver"/>
7175                                 </retrieve>
7176                 <update   permission="ADMIN_INVOICE">
7177                                         <context link="invoice" field="receiver"/>
7178                                 </update>
7179                                 <delete   permission="ADMIN_INVOICE">
7180                                         <context link="invoice" field="receiver"/>
7181                                 </delete>
7182             </actions>
7183         </permacrud>
7184         </class>
7185
7186         <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">
7187                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7188                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7189                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7190                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7191                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7192                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7193                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7194                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7195                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7196                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7197                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7198                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7199                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7200                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7201                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7202                 </fields>
7203                 <links>
7204                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7205                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7206                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7207                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7208                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7209                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7210                 </links>
7211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7212             <actions>
7213                 <create   permission="ADMIN_INVOICE">
7214                                         <context link="invoice" field="receiver"/>
7215                                 </create>
7216                 <retrieve permission="ADMIN_INVOICE">
7217                                         <context link="invoice" field="receiver"/>
7218                                 </retrieve>
7219                 <update   permission="ADMIN_INVOICE">
7220                                         <context link="invoice" field="receiver"/>
7221                                 </update>
7222                                 <delete   permission="ADMIN_INVOICE">
7223                                         <context link="invoice" field="receiver"/>
7224                                 </delete>
7225             </actions>
7226         </permacrud>
7227         </class>
7228
7229         <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">
7230                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7231                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7232                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7233                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7234                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7235                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7236                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7237                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7238                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7239                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7240                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7241                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7242                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7243                 </fields>
7244                 <links>
7245                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7246                 </links>
7247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7248             <actions>
7249                 <create permission="ADMIN_PROVIDER">
7250                     <context link="provider" field="owner"/>
7251                 </create>
7252                 <retrieve permission="ADMIN_PROVIDER">
7253                     <context link="provider" field="owner"/>
7254                 </retrieve>
7255                 <update permission="ADMIN_PROVIDER">
7256                     <context link="provider" field="owner"/>
7257                 </update>
7258                 <delete permission="ADMIN_PROVIDER">
7259                     <context link="provider" field="owner"/>
7260                 </delete>
7261             </actions>
7262         </permacrud>
7263         </class>
7264
7265         <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">
7266                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7267                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7268                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7269                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7270                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7271                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7272                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7273         </fields>
7274                 <links>
7275                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7276                 </links>
7277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7278             <actions>
7279                 <create permission="ADMIN_PROVIDER">
7280                     <context link="provider" field="owner"/>
7281                 </create>
7282                 <retrieve permission="ADMIN_PROVIDER">
7283                     <context link="provider" field="owner"/>
7284                 </retrieve>
7285                 <update permission="ADMIN_PROVIDER">
7286                     <context link="provider" field="owner"/>
7287                 </update>
7288                 <delete permission="ADMIN_PROVIDER">
7289                     <context link="provider" field="owner"/>
7290                 </delete>
7291             </actions>
7292         </permacrud>
7293     </class>
7294         <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">
7295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7296                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7297                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7298                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7299                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7300                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7301                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7302                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7303                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7304                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7305                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7306                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7307                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7308                 </fields>
7309                 <links>
7310                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7311                 </links>
7312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7313             <actions>
7314                 <create permission="ADMIN_PROVIDER">
7315                     <context link="contact" jump='provider' field="owner"/>
7316                 </create>
7317                 <retrieve permission="ADMIN_PROVIDER">
7318                     <context link="contact" jump='provider' field="owner"/>
7319                 </retrieve>
7320                 <update permission="ADMIN_PROVIDER">
7321                     <context link="contact" jump='provider' field="owner"/>
7322                 </update>
7323                 <delete permission="ADMIN_PROVIDER">
7324                     <context link="contact" jump='provider' field="owner"/>
7325                 </delete>
7326             </actions>
7327         </permacrud>
7328         </class>
7329
7330         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7331                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7332                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7333                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7334                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7335                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7336                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7337                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7338                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7339                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7340                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7341                 </fields>
7342                 <links>
7343                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7344                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7345                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7346                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7347                 </links>
7348         </class>
7349
7350         <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">
7351                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7352                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7353                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7354                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7355                 </fields>
7356                 <links>
7357             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7358                 </links>
7359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360                         <actions>
7361                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7362                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7363                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7364                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7365                         </actions>
7366                 </permacrud>
7367         </class>
7368
7369         <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">
7370                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7371                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7372                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7373                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7374                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7375                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7376                 </fields>
7377                 <links>
7378                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7379                 </links>
7380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7381                         <actions>
7382                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7383                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7384                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7385                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7386                         </actions>
7387                 </permacrud>
7388         </class>
7389
7390         <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">
7391                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7392                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7393                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7394                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7395                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7396                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7397                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7398                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7399                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7400                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7401                 </fields>
7402                 <links>
7403                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7404                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7405             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7406             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7407                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7408                 </links>
7409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7410             <actions>
7411                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7412                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7413                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7414                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7415             </actions>
7416         </permacrud>
7417         </class>
7418
7419         <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">
7420                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7421                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7422                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7423                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7424                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7425                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7426                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7427                 </fields>
7428                 <links>
7429                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7430                 </links>
7431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7432                         <actions>
7433                                 <create permission="ADMIN_FUNDING_SOURCE">
7434                     <context link="funding_source" field="owner"/>
7435                 </create>
7436                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7437                     <context link="funding_source" field="owner"/>
7438                 </retrieve>
7439                                 <update permission="ADMIN_FUNDING_SOURCE">
7440                     <context link="funding_source" field="owner"/>
7441                 </update>
7442                                 <delete permission="ADMIN_FUNDING_SOURCE">
7443                     <context link="funding_source" field="owner"/>
7444                 </delete>
7445                         </actions>
7446                 </permacrud>
7447         </class>
7448
7449         <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">
7450                 <fields oils_persist:primary="id">
7451                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7452                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7453                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7454                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7455                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7456                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7457                 </fields>
7458                 <links>
7459                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7460                 </links>
7461         </class>
7462
7463         <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">
7464                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7465                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7466                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7467                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7468                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7469                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7470                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7471                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7472                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7473                 </fields>
7474                 <links>
7475                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7476                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7477                 </links>
7478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7479                         <actions>
7480                                 <create permission="ADMIN_ACQ_FUND">
7481                     <context link="fund" field="org"/>
7482                 </create>
7483                                 <retrieve permission="ADMIN_ACQ_FUND">
7484                     <context link="fund" field="org"/>
7485                 </retrieve>
7486                                 <update permission="ADMIN_ACQ_FUND">
7487                     <context link="fund" field="org"/>
7488                 </update>
7489                                 <delete permission="ADMIN_ACQ_FUND">
7490                     <context link="fund" field="org"/>
7491                 </delete>
7492                         </actions>
7493                 </permacrud>
7494         </class>
7495
7496         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7497                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7498                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7499                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7500                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7501                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7502                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7503                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7504                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7505                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7506                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7507                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7508                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7509                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7510                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7511                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7512                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7513                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7514                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7515                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7516                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7517                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7518                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7519                 </fields>
7520                 <links>
7521                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7522                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7523             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7524             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7525             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7526             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7527             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7528             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7529             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7530             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7531             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7532                 </links>
7533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7534             <actions>
7535                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7536                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7537                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7538                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7539             </actions>
7540         </permacrud>
7541         </class>
7542
7543         <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">
7544                 <fields oils_persist:primary="fund">
7545                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7546                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7547                 </fields>
7548                 <links>
7549                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7550                 </links>
7551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7552             <actions>
7553                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7554                                         <context link="fund" field="org" />
7555                 </retrieve>
7556             </actions>
7557         </permacrud>
7558         </class>
7559
7560         <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">
7561                 <fields oils_persist:primary="fund">
7562                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7563                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7564                 </fields>
7565                 <links>
7566                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7567                 </links>
7568         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7569             <actions>
7570                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7571                                         <context link="fund" field="org" />
7572                 </retrieve>
7573             </actions>
7574         </permacrud>
7575         </class>
7576
7577         <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">
7578                 <fields oils_persist:primary="fund">
7579                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7580                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7581                 </fields>
7582                 <links>
7583                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7584                 </links>
7585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7586             <actions>
7587                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7588                                         <context link="fund" field="org" />
7589                 </retrieve>
7590             </actions>
7591         </permacrud>
7592         </class>
7593
7594         <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">
7595                 <fields oils_persist:primary="fund">
7596                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7597                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7598                 </fields>
7599                 <links>
7600                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7601                 </links>
7602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7603             <actions>
7604                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7605                                         <context link="fund" field="org" />
7606                 </retrieve>
7607             </actions>
7608         </permacrud>
7609         </class>
7610
7611         <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">
7612                 <fields oils_persist:primary="fund">
7613                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7614                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7615                 </fields>
7616                 <links>
7617                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7618                 </links>
7619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7620             <actions>
7621                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7622                                         <context link="fund" field="org" />
7623                 </retrieve>
7624             </actions>
7625         </permacrud>
7626         </class>
7627
7628    <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">
7629         <fields oils_persist:primary="fund">
7630             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7631             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7632         </fields>
7633         <links>
7634             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7635         </links>
7636     </class>
7637
7638    <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">
7639         <fields oils_persist:primary="fund">
7640             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7641             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7642         </fields>
7643         <links>
7644             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7645         </links>
7646     </class>
7647
7648    <class id="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">
7649         <fields oils_persist:primary="fund">
7650             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7651             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7652         </fields>
7653         <links>
7654             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7655         </links>
7656     </class>
7657
7658    <class id="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">
7659         <fields oils_persist:primary="fund">
7660             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7661             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7662         </fields>
7663         <links>
7664             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7665         </links>
7666     </class>
7667
7668    <class id="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">
7669         <fields oils_persist:primary="fund">
7670             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7671             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7672         </fields>
7673         <links>
7674             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7675         </links>
7676     </class>
7677
7678         <class id="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">
7679                 <fields oils_persist:primary="funding_source">
7680                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7681                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7682                 </fields>
7683                 <links>
7684                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7685                 </links>
7686         </class>
7687
7688         <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">
7689                 <fields oils_persist:primary="funding_source">
7690                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7691                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7692                 </fields>
7693                 <links>
7694                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7695                 </links>
7696         </class>
7697
7698         <class id="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">
7699                 <fields oils_persist:primary="funding_source">
7700                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7701                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7702                 </fields>
7703                 <links>
7704                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7705                 </links>
7706         </class>
7707
7708         <class id="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">
7709                 <fields oils_persist:primary="fund">
7710                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7711                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7712                 </fields>
7713                 <links>
7714                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7715                 </links>
7716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7717             <actions>
7718                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7719                                         <context link="fund" field="org" />
7720                 </retrieve>
7721             </actions>
7722         </permacrud>
7723     </class>
7724     <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">
7725         <oils_persist:source_definition><![CDATA[
7726             SELECT
7727                 acqf.*,
7728                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7729                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7730                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7731                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7732             FROM
7733                 acq.fund acqf
7734                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7735                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7736                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7737                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7738         ]]></oils_persist:source_definition>
7739         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7740             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7741             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7742             <field reporter:label="Name" name="name" reporter:datatype="text" />
7743             <field reporter:label="Year" name="year" reporter:datatype="int" />
7744             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7745             <field reporter:label="Code" name="code" reporter:datatype="text" />
7746             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7747             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7748             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7749             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7750             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7751
7752             <!-- non fund-native fields -->
7753             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7754             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7755             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7756             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7757         </fields>
7758         <links>
7759             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7760             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7761             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7762         </links>
7763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7764             <actions>
7765                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7766             </actions>
7767         </permacrud>
7768         </class>
7769         <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">
7770                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7771                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7772                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7773                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7774                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7775                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7776                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7777                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7778                 </fields>
7779                 <links>
7780                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7781                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7782                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7783                 </links>
7784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7785                         <actions>
7786                                 <create permission="ADMIN_ACQ_FUND">
7787                     <context link="fund" field="org"/>
7788                 </create>
7789                                 <retrieve permission="ADMIN_ACQ_FUND">
7790                     <context link="fund" field="org"/>
7791                 </retrieve>
7792                                 <update permission="ADMIN_ACQ_FUND">
7793                     <context link="fund" field="org"/>
7794                 </update>
7795                                 <delete permission="ADMIN_ACQ_FUND">
7796                     <context link="fund" field="org"/>
7797                 </delete>
7798                         </actions>
7799                 </permacrud>
7800         </class>
7801
7802     <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">
7803         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7804             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7805             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7806             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7807             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7808             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7809             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7810             <field reporter:label="Note" name="note" reporter:datatype="text" />
7811             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7812         </fields>
7813         <links>
7814             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7815             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7816             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7817         </links>
7818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7819                         <actions>
7820                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7821                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7822                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7823                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7824                         </actions>
7825                 </permacrud>
7826     </class>
7827
7828         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7829                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7830                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7831                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7832                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7833                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7834                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7835                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7836                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7837                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7838                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7839                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7840                 </fields>
7841                 <links>
7842                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7843                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7844                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7845                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7846                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7847                 </links>
7848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849                         <actions>
7850                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7851                         </actions>
7852                 </permacrud>
7853         </class>
7854
7855         <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">
7856                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7857                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7858                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7859                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7860                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7861                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7862                 </fields>
7863                 <links>
7864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7865                 </links>
7866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7867                         <actions>
7868                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7869                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7870                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7871                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7872                         </actions>
7873                 </permacrud>
7874         </class>
7875
7876         <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">
7877                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7878                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7879                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7880                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7881                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7882                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7883                         <field reporter:label="State" name="state" reporter:datatype="text" />
7884                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7885                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7886                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7887                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7888                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7889                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7890                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7891                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7892                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7893                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7894                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7895                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7896                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7897                 </fields>
7898                 <links>
7899                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7900                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7901                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7902                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7903                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7904                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7905                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7906                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7907                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7908                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7909                 </links>
7910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7911                         <actions>
7912                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7913                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7914                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7915                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7916                         </actions>
7917                 </permacrud>
7918         </class>
7919
7920         <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">
7921                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7922                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7923                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7924                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7925                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7926                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7927                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7928                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7929                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7930                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7931                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7932                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7933                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7934                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7935                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7936                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7937                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7938                 </fields>
7939                 <links>
7940                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7941                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7942                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7943                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7944                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7945                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7946                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7947                 </links>
7948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7949             <actions>
7950                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7951             </actions>
7952                 </permacrud>
7953         </class>
7954
7955         <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">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7957                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7958                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7959                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7960                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7961                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7962                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7963                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7964                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7965                 </fields>
7966                 <links>
7967                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7968                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7969                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7970                 </links>
7971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7972             <actions>
7973                 <create permission="CREATE_PURCHASE_ORDER">
7974                     <context link="purchase_order" field="ordering_agency"/>
7975                 </create>
7976                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7977                     <context link="purchase_order" field="ordering_agency"/>
7978                 </retrieve>
7979                 <update permission="CREATE_PURCHASE_ORDER">
7980                     <context link="purchase_order" field="ordering_agency"/>
7981                 </update>
7982                 <delete permission="CREATE_PURCHASE_ORDER">
7983                     <context link="purchase_order" field="ordering_agency"/>
7984                 </delete>
7985             </actions>
7986                 </permacrud>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7991                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7992                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7993                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7994                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7995                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7996                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7997                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7998                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7999                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8000                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8001                 </fields>
8002                 <links>
8003                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8004                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8005                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8006                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8007                 </links>
8008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8009             <actions>
8010                 <create permission="CREATE_PURCHASE_ORDER">
8011                     <context link="purchase_order" field="ordering_agency"/>
8012                 </create>
8013                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8014                     <context link="purchase_order" field="ordering_agency"/>
8015                 </retrieve>
8016                 <update permission="CREATE_PURCHASE_ORDER">
8017                     <context link="purchase_order" field="ordering_agency"/>
8018                 </update>
8019                 <delete permission="CREATE_PURCHASE_ORDER">
8020                     <context link="purchase_order" field="ordering_agency"/>
8021                 </delete>
8022             </actions>
8023                 </permacrud>
8024         </class>
8025
8026         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8028                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8029                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8030                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8031                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8032                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8033                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8034                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8035                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8036                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8037                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8038                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8039                         <field reporter:label="State" name="state" reporter:datatype="text" />
8040                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8041                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8042                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8043                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8044                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8045                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8046                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8047                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8048                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8049                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8050                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8051                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8052                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8053                 </fields>
8054                 <links>
8055                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8056                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8057                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8058                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8059                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8060                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8061                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8062                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8063                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8064                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8065                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8066                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8067                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8068                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8069                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8070                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8071                 </links>
8072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8073                         <actions>
8074                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8075                                         <context link="purchase_order" field="ordering_agency"/>
8076                                         <context link="picklist" field="org_unit"/>
8077                                 </retrieve>
8078                         </actions>
8079                 </permacrud>
8080         </class>
8081
8082         <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">
8083                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8084                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8085                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8086                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8087                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8088                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8089                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8090                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8091                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8092                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8093                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8094                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8095                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8096                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8097                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8098                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8099                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8100                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8101                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8102                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8103                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8104                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8105                 </fields>
8106                 <links>
8107                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8108                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8109                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8110                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8111                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8112                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8113                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8114                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8115                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8116                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8117                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8118                 </links>
8119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8120                         <actions>
8121                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8122                                         <context link="purchase_order" field="ordering_agency"/>
8123                                         <context link="picklist" field="org_unit"/>
8124                                 </retrieve>
8125                         </actions>
8126                 </permacrud>
8127         </class>
8128
8129         <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">
8130                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8131                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8132                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8133                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8134                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8135                 </fields>
8136                 <links>
8137                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8138                 </links>
8139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8140                         <actions>
8141                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8142                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8143                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8144                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8145                         </actions>
8146                 </permacrud>
8147         </class>
8148
8149         <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">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8151                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8152                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8153                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8154                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8155                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8156                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8157                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8158                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8159                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8160                 </fields>
8161                 <links>
8162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8163                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8164                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8165                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8166                 </links>
8167         </class>
8168
8169         <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">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8171                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8172                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8173                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8174                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8175                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8176                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8177                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8178                 </fields>
8179                 <links>
8180                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8181                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8182                 </links>
8183         </class>
8184
8185         <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">
8186                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8187                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8188                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8189                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8190                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8191                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8192                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8193                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8194                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8195                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8196                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8197                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8198                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8199                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8200                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8201                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8202                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8203                 </fields>
8204                 <links>
8205                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8206                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8207                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8208                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8209                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8210                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8211                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8212                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8213                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8214                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8215                 </links>
8216         </class>
8217
8218         <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">
8219                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8220                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8221                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8222                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8223                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8224                 </fields>
8225                 <links/>
8226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8227                         <actions>
8228                                 <retrieve />
8229                         </actions>
8230                 </permacrud>
8231         </class>
8232
8233         <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">
8234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8235                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8236                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8237                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8238                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8239                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8240             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8241                 </fields>
8242                 <links/>
8243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8244             <actions>
8245                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8246                 <retrieve />
8247                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8248                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8249             </actions>
8250         </permacrud>
8251         </class>
8252
8253         <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">
8254                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8255                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8256                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8257                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8258                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8259                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8260                 </fields>
8261                 <links/>
8262         </class>
8263         <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">
8264                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8265                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8266                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8267                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8268                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8269                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8270                 </fields>
8271                 <links>
8272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8273                 </links>
8274         </class>
8275
8276         <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">
8277             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8278                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8279                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8280                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8281                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8282                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8283                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8284         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8285
8286             </fields>
8287             <links>
8288                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8289             </links>
8290             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8291                 <actions>
8292                     <create permission="ADMIN_PROVIDER">
8293                         <context link="provider" field="owner"/>
8294                     </create>
8295                     <retrieve permission="ADMIN_PROVIDER">
8296                         <context link="provider" field="owner"/>
8297                     </retrieve>
8298                     <update permission="ADMIN_PROVIDER">
8299                         <context link="provider" field="owner"/>
8300                     </update>
8301                     <delete permission="ADMIN_PROVIDER">
8302                         <context link="provider" field="owner"/>
8303                     </delete>
8304                 </actions>
8305             </permacrud>
8306         </class>
8307         
8308         <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">
8309             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8310                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8311                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8312                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8313                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8314             </fields>
8315             <links>
8316                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8317             </links>
8318             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8319                 <actions>
8320                     <create permission="ADMIN_PROVIDER">
8321                         <context link="provider" field="owner"/>
8322                     </create>
8323                     <retrieve permission="ADMIN_PROVIDER">
8324                         <context link="provider" field="owner"/>
8325                     </retrieve>
8326                     <update permission="ADMIN_PROVIDER">
8327                         <context link="provider" field="owner"/>
8328                     </update>
8329                     <delete permission="ADMIN_PROVIDER">
8330                         <context link="provider" field="owner"/>
8331                     </delete>
8332                 </actions>
8333             </permacrud>
8334         </class>
8335         
8336         <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">
8337             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8338                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8339                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8341                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8342                 </fields>
8343                 <links/>
8344         </class>
8345
8346         <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">
8347                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8348                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8349                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8350                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8351                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8352                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8353                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8354                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8355                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8356                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8357                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8358                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8359                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8360                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8361                 </fields>
8362                 <links>
8363                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8364                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8365                 </links>
8366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8367             <actions>
8368                 <create permission="ADMIN_PROVIDER">
8369                     <context link="provider" field="owner"/>
8370                 </create>
8371                 <retrieve permission="ADMIN_PROVIDER">
8372                     <context link="provider" field="owner"/>
8373                 </retrieve>
8374                 <update permission="ADMIN_PROVIDER">
8375                     <context link="provider" field="owner"/>
8376                 </update>
8377                 <delete permission="ADMIN_PROVIDER">
8378                     <context link="provider" field="owner"/>
8379                 </delete>
8380             </actions>
8381         </permacrud>
8382         </class>
8383
8384         <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">
8385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8386                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8387                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8388                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8389                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8390                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8391                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8392                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8393                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8394                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8395                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8396                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8397                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8398                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8399                 </fields>
8400                 <links>
8401                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8402                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8403                 </links>
8404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8405             <actions>
8406                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8407                     <context link="account" jump="provider" field="owner"/>
8408                 </retrieve>
8409                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8410                     <context link="account" jump="provider" field="owner"/>
8411                 </update>
8412                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8413                     <context link="account" jump="provider" field="owner"/>
8414                 </delete>
8415             </actions>
8416         </permacrud>
8417         </class>
8418
8419
8420         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8421                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8422                         <field name="id" reporter:datatype="id" />
8423                         <field name="parent" reporter:datatype="link"/>
8424                         <field name="owner" reporter:datatype="link"/>
8425                         <field name="create_time" reporter:datatype="timestamp"/>
8426                         <field name="name" reporter:datatype="text"/>
8427                         <field name="shared" reporter:datatype="bool"/>
8428                         <field name="share_with" reporter:datatype="link"/>
8429                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8430                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8431                 </fields>
8432                 <links>
8433                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8434                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8435                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8436                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8437                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8438                 </links>
8439         </class>
8440         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8441                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8442                         <field name="id" reporter:datatype="id" />
8443                         <field name="parent" reporter:datatype="link"/>
8444                         <field name="owner" reporter:datatype="link"/>
8445                         <field name="create_time" reporter:datatype="timestamp"/>
8446                         <field name="name" reporter:datatype="text"/>
8447                         <field name="shared" reporter:datatype="bool"/>
8448                         <field name="share_with" reporter:datatype="link"/>
8449                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8450                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8451                 </fields>
8452                 <links>
8453                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8454                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8455                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8456                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8457                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8458                 </links>
8459         </class>
8460         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8461                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8462                         <field name="id" reporter:datatype="id" />
8463                         <field name="parent" reporter:datatype="link"/>
8464                         <field name="owner" reporter:datatype="link"/>
8465                         <field name="create_time" reporter:datatype="timestamp"/>
8466                         <field name="name" reporter:datatype="text"/>
8467                         <field name="shared" reporter:datatype="bool"/>
8468                         <field name="share_with" reporter:datatype="link"/>
8469                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8470                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8471                 </fields>
8472                 <links>
8473                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8474                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8475                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8476                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8477                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8478                 </links>
8479         </class>
8480         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8481                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8482                         <field name="id" reporter:datatype="id" />
8483                         <field name="owner" reporter:datatype="link"/>
8484                         <field name="create_time" reporter:datatype="timestamp"/>
8485                         <field name="name" reporter:datatype="text"/>
8486                         <field name="data" reporter:datatype="text"/>
8487                         <field name="folder" reporter:datatype="link"/>
8488                         <field name="description" reporter:datatype="text"/>
8489                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8490                 </fields>
8491                 <links>
8492                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8493                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8494                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8495                 </links>
8496         </class>
8497         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8498                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8499                         <field name="id" reporter:datatype="id" />
8500                         <field name="owner" reporter:datatype="link"/>
8501                         <field name="create_time" reporter:datatype="timestamp"/>
8502                         <field name="template" reporter:datatype="link"/>
8503                         <field name="data" reporter:datatype="text"/>
8504                         <field name="folder" reporter:datatype="link"/>
8505                         <field name="recur" reporter:datatype="bool"/>
8506                         <field name="recurrence" reporter:datatype="interval"/>
8507                         <field name="name" reporter:datatype="text"/>
8508                         <field name="description" reporter:datatype="text"/>
8509                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8510                 </fields>
8511                 <links>
8512                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8513                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8514                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8515                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8516                 </links>
8517         </class>
8518         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8519                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8520                         <field name="id" reporter:datatype="id" />
8521                         <field name="runner" reporter:datatype="link"/>
8522                         <field name="start_time" reporter:datatype="timestamp"/>
8523                         <field name="complete_time" reporter:datatype="timestamp"/>
8524                         <field name="run_time" reporter:datatype="timestamp"/>
8525                         <field name="email" reporter:datatype="text"/>
8526                         <field name="excel_format" reporter:datatype="bool"/>
8527                         <field name="csv_format" reporter:datatype="bool"/>
8528                         <field name="html_format" reporter:datatype="bool"/>
8529                         <field name="error_code" reporter:datatype="int"/>
8530                         <field name="error_text" reporter:datatype="text"/>
8531                         <field name="report" reporter:datatype="link"/>
8532                         <field name="folder" reporter:datatype="link"/>
8533                         <field name="chart_pie" reporter:datatype="bool"/>
8534                         <field name="chart_bar" reporter:datatype="bool"/>
8535                         <field name="chart_line" reporter:datatype="bool"/>
8536                 </fields>
8537                 <links>
8538                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8539                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8540                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8541                 </links>
8542         </class>
8543         <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">
8544                 <fields oils_persist:primary="id">
8545                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8546                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8547                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8548                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8549                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8550                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8551                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8552                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8553                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8554                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8555                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8556                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8557                 </fields>
8558                 <links>
8559                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8560                 </links>
8561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8562                         <actions>
8563                                 <retrieve />
8564                         </actions>
8565                 </permacrud>
8566         </class>
8567         <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">
8568                 <fields oils_persist:primary="id">
8569                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8570                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8571                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8572                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8573                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8574                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8575                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8576                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8577                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8578                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8579                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8580                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8581                 </fields>
8582                 <links>
8583                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8584                 </links>
8585         </class>
8586         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8587                 <fields oils_persist:primary="id">
8588                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8589                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8590                         <field reporter:label="Fingerprint" name="fingerprint" />
8591                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8592                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8593                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8594                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8595                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8596                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8597                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8598                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8599                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8600                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8601                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8602                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8603                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8604                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8605                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8606                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8607                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8608                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8609                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8610                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8611                 </fields>
8612                 <links>
8613                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8614                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8615                 </links>
8616         </class>
8617         <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">
8618                 <fields oils_persist:primary="id">
8619                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8620                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8621                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8622                 </fields>
8623                 <links>
8624                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8625                 </links>
8626         </class>
8627         <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">
8628                 <fields oils_persist:primary="id">
8629                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8630                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8631                 </fields>
8632                 <links>
8633                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8634                 </links>
8635         </class>
8636         <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">
8637                 <fields oils_persist:primary="id">
8638                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8639                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8640                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8641                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8642                 </fields>
8643                 <links>
8644                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8645                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8646                 </links>
8647         </class>
8648         <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">
8649                 <fields oils_persist:primary="xact">
8650                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8651                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8652                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8653                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8654                 </fields>
8655                 <links>
8656                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8657                 </links>
8658         </class>
8659         <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">
8660                 <fields oils_persist:primary="xact">
8661                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8662                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8663                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8664                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8665                 </fields>
8666                 <links>
8667                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8668                 </links>
8669         </class>
8670         <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)">
8671                 <fields oils_persist:primary="id">
8672                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8673                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8674                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8675                 </fields>
8676                 <links>
8677                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8678                 </links>
8679         </class>
8680         <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">
8681                 <fields oils_persist:primary="id">
8682                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8683                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8684                 </fields>
8685                 <links>
8686                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8687                 </links>
8688         </class>
8689         <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">
8690                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8691                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8692                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8693                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8694                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8695                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8696                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8697                 </fields>
8698                 <links>
8699                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8700                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8701                 </links>
8702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8703                         <actions>
8704                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8705                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8706                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8707                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8708                         </actions>
8709                 </permacrud>
8710         </class>
8711         <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">
8712                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8713                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8714                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8715                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8716                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8717                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8718                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8719                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8720                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8721                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8722                 </fields>
8723                 <links>
8724                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8725                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8726                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8727                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8728                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8729                 </links>
8730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8731                         <actions>
8732                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8733                                         <context link="formula" field="owner"/>
8734                                 </create>
8735                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8736                                         <context link="formula" field="owner"/>
8737                                 </retrieve>
8738                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8739                                         <context link="formula" field="owner"/>
8740                                 </update>
8741                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8742                                         <context link="formula" field="owner"/>
8743                                 </delete>
8744                         </actions>
8745                 </permacrud>
8746         </class>
8747
8748         <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">
8749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8750                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8751                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8752                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8753                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8754                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8755                 </fields>
8756                 <links>
8757                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8758                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8759                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8760                 </links>
8761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8762                         <actions>
8763                                 <create permission="CREATE_PURCHASE_ORDER">
8764                                         <context link="formula" field="owner"/>
8765                 </create>
8766                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8767                                         <context link="formula" field="owner"/>
8768                 </retrieve>
8769                                 <update permission="CREATE_PURCHASE_ORDER">
8770                                         <context link="formula" field="owner"/>
8771                 </update>
8772                                 <delete permission="CREATE_PURCHASE_ORDER">
8773                                         <context link="formula" field="owner"/>
8774                 </delete>
8775                         </actions>
8776                 </permacrud>
8777         </class>
8778
8779         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8780                 <fields oils_persist:primary="id">
8781                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8782                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8783                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8784                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8785                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8786                 </fields>
8787                 <links>
8788                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8789                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8790                 </links>
8791         </class>
8792
8793         <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">
8794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8795                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8796                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8797                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8798                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8799                 </fields>
8800                 <links>
8801                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8802                 </links>
8803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8804                         <actions>
8805                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8806                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8807                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8808                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8809                         </actions>
8810                 </permacrud>
8811         </class>
8812
8813         <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">
8814                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8815                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8816                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8817                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8818                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8819                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8820                 </fields>
8821                 <links>
8822                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8823                 </links>
8824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8825                         <actions>
8826                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8827                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8828                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8829                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8830                         </actions>
8831                 </permacrud>
8832         </class>
8833
8834         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8835                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8836                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8837                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8838                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8839                 </fields>
8840                 <links>
8841                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8842                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8843                 </links>
8844         </class>
8845
8846         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8847                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8848                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8849                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8850                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8851                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8852                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8853                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8854                 </fields>
8855                 <links>
8856                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8857                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8858                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8859                 </links>
8860         </class>
8861
8862         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8864                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8865                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8866                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8867                 </fields>
8868                 <links>
8869                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8870                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8871                 </links>
8872         </class>
8873
8874         <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">
8875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8876                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8877                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8878                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8879                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8880                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8881                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8882                 </fields>
8883                 <links>
8884                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8885                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8886                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8887                 </links>
8888         </class>
8889
8890         <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">
8891                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8892                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8893                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8894                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8895                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8896                 </fields>
8897                 <links>
8898                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8899                 </links>
8900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8901             <actions>
8902                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8903                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8904                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8905                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8906             </actions>
8907                 </permacrud>
8908         </class>
8909
8910         <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">
8911                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8912                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8913                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8914                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8915                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8916                 </fields>
8917                 <links>
8918                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8919                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8920                 </links>
8921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8922                         <actions>
8923                                 <create permission="ADMIN_CLAIM_POLICY">
8924                                         <context link="claim_policy" field="org_unit"/>
8925                 </create>
8926                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8927                                         <context link="claim_policy" field="org_unit"/>
8928                 </retrieve>
8929                                 <update permission="ADMIN_CLAIM_POLICY">
8930                                         <context link="claim_policy" field="org_unit"/>
8931                 </update>
8932                                 <delete permission="ADMIN_CLAIM_POLICY">
8933                                         <context link="claim_policy" field="org_unit"/>
8934                 </delete>
8935                         </actions>
8936                 </permacrud>
8937         </class>
8938
8939     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8940         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
8941             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8942             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8943             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8944             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8945             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8946             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8947             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8948             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8949             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8950             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8951             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8952             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8953             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8954             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8955             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8956         </fields>
8957     </class>
8958
8959     <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">
8960         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8961             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8962             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8963             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8964             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8965             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8966         </fields>
8967     </class>
8968
8969     <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">
8970         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8971             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8972             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8973             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8974             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8975             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8976             <field reporter:label="City" name="city" reporter:datatype="text"/>
8977             <field reporter:label="State" name="state" reporter:datatype="text"/>
8978             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8979             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8980             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8981         </fields>
8982     </class>
8983
8984     <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">
8985         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8986             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8987             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8988             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8989             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8990             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8991             <field reporter:label="City" name="city" reporter:datatype="text"/>
8992             <field reporter:label="State" name="state" reporter:datatype="text"/>
8993             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8994             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8995             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8996         </fields>
8997     </class>
8998
8999     <class id="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">
9000         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9001             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9002             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9003             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9004             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9005             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9006             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9007         </fields>
9008     </class>
9009
9010         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9011                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9012                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9013                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9014                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9015                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9016                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9017                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9018                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9019                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9020                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9021                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9022                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9023                 </fields>
9024                 <links>
9025                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9026                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9027                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9028                 </links>
9029         </class>
9030
9031         <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">
9032                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9033                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9034                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9035                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9036                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9037                 </fields>
9038                 <links>
9039                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9040                 </links>
9041         </class>
9042
9043     <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">
9044         <fields>
9045             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9046             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9047             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9048         </fields>
9049                 <links>
9050                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9051                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9052                 </links>
9053     </class>
9054
9055     <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">
9056         <fields>
9057             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9058             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9059         </fields>
9060                 <links>
9061                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9062                 </links>
9063     </class>
9064
9065     <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">
9066         <fields>
9067             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9068             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9069             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9070         </fields>
9071                 <links>
9072                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9073                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9074                 </links>
9075     </class>
9076
9077     <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">
9078         <fields>
9079             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9080             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9081         </fields>
9082                 <links>
9083                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9084                 </links>
9085     </class>
9086
9087     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9088                 <oils_persist:source_definition>
9089
9090             SELECT  DISTINCT l.*
9091               FROM  action.unfulfilled_hold_loops l
9092                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9093               WHERE l.count = m.max
9094
9095                 </oils_persist:source_definition>
9096         <fields>
9097             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9098             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9099             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9100         </fields>
9101                 <links>
9102                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9103                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9104                 </links>
9105     </class>
9106
9107         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9108                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9109                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9110                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9111                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9112                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9113                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9114                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9115                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9116                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9117                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9118                 </fields>
9119                 <links>
9120                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9121                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9122                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9123                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9124                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9125                 </links>
9126         </class>
9127
9128         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9129                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9130                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9131                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9132                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9133                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9134                 </fields>
9135                 <links>
9136                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9137                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9138                 </links>
9139         </class>
9140
9141         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9142                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9143                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9144                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9145                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9146                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9147                 </fields>
9148                 <links>
9149                 </links>
9150         </class>
9151
9152         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9153                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9154                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9155                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9156                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9157                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9158                 </fields>
9159                 <links>
9160                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9161                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9162                 </links>
9163         </class>
9164         
9165         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9166                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9167                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9168                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9169                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9170                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9171                 </fields>
9172                 <links>
9173                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9174                 </links>
9175         </class>
9176         
9177         <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">
9178                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9179                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9180                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9181                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9182                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9183                 </fields>
9184                 <links>
9185                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9186                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9187                 </links>
9188         </class>
9189
9190         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9191                 <fields oils_persist:primary="name">
9192                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9193                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9194                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9195                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9196                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9197                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9198                 </fields>
9199                 <links>
9200                 </links>
9201         </class>
9202
9203         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9204                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9205                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9206                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9207                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9208                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9209                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9210                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9211                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9212                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9213                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9214                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9215                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9216                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9217                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9218                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9219                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9220                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9221                 </fields>
9222                 <links>
9223                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9224                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9225                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9226                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9227                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9228                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9229                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9230                 </links>
9231         </class>
9232
9233         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9234                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9235                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9236                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9237                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9238                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9239                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9240                 </fields>
9241                 <links>
9242                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9243                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9244                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9245                 </links>
9246         </class>
9247
9248         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9249                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9250                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9251                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9252                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9253                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9254                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9255                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9256                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9257                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9258                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9259                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9260                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9261                 </fields>
9262                 <links>
9263                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9264                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9265                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9266                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9267                 </links>
9268         </class>
9269
9270         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9271                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9272                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9273                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9274                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9275                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9276                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9277                 </fields>
9278                 <links>
9279                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9280                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9281                 </links>
9282         </class>
9283
9284         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9285                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9286                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9287                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9288                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9289                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9290                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9291                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9292                 </fields>
9293                 <links>
9294                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9295                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9296                 </links>
9297         </class>
9298
9299         <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">
9300                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9301                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9302                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9303                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9304                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
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="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9313                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9314                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9315                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9316                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9317                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9318                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9319                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9320                 </fields>
9321                 <links>
9322                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9323                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9324                 </links>
9325         </class>
9326
9327         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9328                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9329                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9330                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9331                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9332                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9333                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9334                 </fields>
9335                 <links>
9336                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9337                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9338                 </links>
9339         </class>
9340
9341         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9343                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9344                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9345                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9346                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9347                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9348                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9349                 </fields>
9350                 <links>
9351                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9352                 </links>
9353         </class>
9354
9355         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9356                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9357                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9358                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9359                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9360                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9361                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9362                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9363                 </fields>
9364                 <links>
9365                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9366                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9367                 </links>
9368         </class>
9369
9370         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9371                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9372                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9373                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9374                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9375                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9376                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9377                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9378                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9379                 </fields>
9380                 <links>
9381                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9382                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9383                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9384                 </links>
9385         </class>
9386
9387         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9388                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9389                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9390                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9391                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9392                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9393                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9394                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9395                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9396                 </fields>
9397                 <links>
9398                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9399                 </links>
9400         </class>
9401
9402         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9403                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9404                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9405                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9406                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9407                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9408                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9409                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9410                 </fields>
9411                 <links>
9412                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9413                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9414                 </links>
9415         </class>
9416
9417         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9418                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9419                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9420                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9421                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9422                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9423                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9424                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9425                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9426                 </fields>
9427                 <links>
9428                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9429                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9430                 </links>
9431         </class>
9432
9433         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9434                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9435                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9436                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9437                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9438                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9439                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9440                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9441                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9442                 </fields>
9443                 <links>
9444                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9445                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9446                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9447                 </links>
9448         </class>
9449
9450         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9451                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9452                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9453                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9454                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9455                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9456                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9457                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9458                 </fields>
9459                 <links>
9460                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9461                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9462                 </links>
9463         </class>
9464
9465         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9466                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9467                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9468                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9469                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9470                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9471                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9472                 </fields>
9473                 <links>
9474                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9475                 </links>
9476         </class>
9477
9478         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number 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="Literal" name="literal" reporter:datatype="text"/>
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="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator 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="Left Operand" name="left_operand" reporter:datatype="link"/>
9498                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9499                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9500                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9501                 </fields>
9502                 <links>
9503                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9504                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9505                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9506                 </links>
9507         </class>
9508
9509         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9510                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9511                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9512                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9513                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9514                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9515                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9516                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9517                 </fields>
9518                 <links>
9519                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9520                 </links>
9521         </class>
9522
9523         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9524                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9525                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9526                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9527                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9528                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9529                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
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="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery 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="Subquery" name="subquery" reporter:datatype="link"/>
9543                 </fields>
9544                 <links>
9545                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9546                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9547                 </links>
9548         </class>
9549
9550         <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">
9551                 <fields oils_persist:primary="id">
9552                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9553                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9554                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9555                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9556                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9557                 </fields>
9558                 <links>
9559                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9560                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9561                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9562                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9563                 </links>
9564         </class>
9565
9566         <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">
9567                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9568                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9569                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9570                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9571                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9572                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9573                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9574                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9575                 </fields>
9576                 <links/>
9577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9578                         <actions>
9579                                 <retrieve/>
9580                         </actions>
9581                 </permacrud>
9582         </class>
9583
9584         <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">
9585                 <fields oils_persist:primary="ptype_key">
9586                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9587                         <field reporter:label="Label" name="label" 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="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">
9598                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9599                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9600                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9601                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9602                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9603                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9604                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9605                 </fields>
9606                 <links>
9607                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9608                 </links>
9609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9610                         <actions>
9611                                 <retrieve/>
9612                         </actions>
9613                 </permacrud>
9614         </class>
9615
9616         <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">
9617                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9618                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9619                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9620                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9621                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9622                 </fields>
9623                 <links>
9624                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9625                 </links>
9626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9627                         <actions>
9628                                 <retrieve/>
9629                         </actions>
9630                 </permacrud>
9631         </class>
9632
9633     <class
9634         id="uvs"
9635         controller="open-ils.cstore open-ils.pcrud"
9636         oils_obj:fieldmapper="url_verify::session"
9637         oils_persist:tablename="url_verify.session"
9638         reporter:label="URL Verification Session"
9639     >
9640         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9641             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9642             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9643                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9644             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9645             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9646             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9647             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9648             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9649             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9650         </fields>
9651
9652         <links>
9653             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9654             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9655             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9656             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9657             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9658         </links>
9659
9660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9661             <actions>
9662                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9663             </actions>
9664         </permacrud>
9665
9666     </class>
9667
9668     <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">
9669         <oils_persist:source_definition>
9670             SELECT
9671                 cbrebi.id AS id,  -- so we can have a pkey in our view
9672                 uvs.id AS session,
9673                 uvs.owning_lib,
9674                 cbrebi.target_biblio_record_entry
9675             FROM url_verify.session uvs
9676             JOIN container.biblio_record_entry_bucket cbreb
9677                 ON (uvs.container = cbreb.id)
9678             JOIN container.biblio_record_entry_bucket_item cbrebi
9679                 ON (cbrebi.bucket = cbreb.id)
9680         </oils_persist:source_definition>
9681         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9682             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9683             <field reporter:label="Session" name="session" reporter:datatype="link" />
9684             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9685             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9686         </fields>
9687         <links>
9688             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9689             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9690             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9691         </links>
9692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9693             <actions>
9694                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9695             </actions>
9696         </permacrud>
9697     </class>
9698
9699     <class
9700         id="uvus"
9701         controller="open-ils.cstore open-ils.pcrud"
9702         oils_obj:fieldmapper="url_verify::url_selector"
9703         oils_persist:tablename="url_verify.url_selector"
9704         reporter:label="URL Verification URL Selector"
9705     >
9706         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9707             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9708             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9709                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9710             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9711         </fields>
9712
9713         <links>
9714             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9715             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9716         </links>
9717
9718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9719             <actions>
9720                 <create permission="URL_VERIFY">
9721                     <context link="session" field="owning_lib"/>
9722                 </create>
9723                 <retrieve permission="URL_VERIFY">
9724                     <context link="session" field="owning_lib"/>
9725                 </retrieve>
9726                 <update permission="URL_VERIFY">
9727                     <context link="session" field="owning_lib"/>
9728                 </update>
9729                 <delete permission="URL_VERIFY">
9730                     <context link="session" field="owning_lib"/>
9731                 </delete>
9732             </actions>
9733         </permacrud>
9734
9735     </class>
9736
9737     <class
9738         id="uvu"
9739         controller="open-ils.cstore open-ils.pcrud"
9740         oils_obj:fieldmapper="url_verify::url"
9741         oils_persist:tablename="url_verify.url"
9742         reporter:label="URL Verification URL"
9743     >
9744         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9745             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9746                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9747                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9748                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9749                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9750             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9751             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9752             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9753             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9754             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9755             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9756             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9757             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9758             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9759             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9760             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9761             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9762             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9763         </fields>
9764
9765         <links>
9766             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9767             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9768             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9769             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9770             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9771         </links>
9772
9773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9774             <actions>
9775                 <create permission="URL_VERIFY">
9776                     <context link="session" field="owning_lib"/>
9777                 </create>
9778                 <retrieve permission="URL_VERIFY">
9779                     <context link="session" field="owning_lib"/>
9780                 </retrieve>
9781                 <update permission="URL_VERIFY">
9782                     <context link="session" field="owning_lib"/>
9783                 </update>
9784                 <delete permission="URL_VERIFY">
9785                     <context link="session" field="owning_lib"/>
9786                 </delete>
9787             </actions>
9788         </permacrud>
9789
9790     </class>
9791
9792     <class
9793         id="uvva"
9794         controller="open-ils.cstore open-ils.pcrud"
9795         oils_obj:fieldmapper="url_verify::verification_attempt"
9796         oils_persist:tablename="url_verify.verification_attempt"
9797         reporter:label="URL Verification Attempt"
9798     >
9799         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9800             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9801                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9802                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9803             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9804             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9805         </fields>
9806
9807         <links>
9808             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9809             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9810         </links>
9811
9812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9813             <actions>
9814                 <create permission="URL_VERIFY">
9815                     <context link="session" field="owning_lib"/>
9816                 </create>
9817                 <retrieve permission="URL_VERIFY">
9818                     <context link="session" field="owning_lib"/>
9819                 </retrieve>
9820                 <update permission="URL_VERIFY">
9821                     <context link="session" field="owning_lib"/>
9822                 </update>
9823                 <delete permission="URL_VERIFY">
9824                     <context link="session" field="owning_lib"/>
9825                 </delete>
9826             </actions>
9827         </permacrud>
9828
9829     </class>
9830
9831     <class
9832         id="uvuv"
9833         controller="open-ils.cstore open-ils.pcrud"
9834         oils_obj:fieldmapper="url_verify::url_verification"
9835         oils_persist:tablename="url_verify.url_verification"
9836         reporter:label="URL Verification"
9837     >
9838         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9839             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9840                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9841                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9842             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9843             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9844             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9845             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9846                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9847         </fields>
9848
9849         <links>
9850             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9851             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9852             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9853         </links>
9854
9855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9856             <actions>
9857                 <create permission="URL_VERIFY">
9858                     <context link="attempt" jump="session" field="owning_lib"/>
9859                 </create>
9860                 <retrieve permission="URL_VERIFY">
9861                     <context link="attempt" jump="session" field="owning_lib"/>
9862                 </retrieve>
9863                 <update permission="URL_VERIFY">
9864                     <context link="attempt" jump="session" field="owning_lib"/>
9865                 </update>
9866                 <delete permission="URL_VERIFY">
9867                     <context link="attempt" jump="session" field="owning_lib"/>
9868                 </delete>
9869             </actions>
9870         </permacrud>
9871
9872     </class>
9873
9874         <class
9875                 id="cfdi"
9876                 controller="open-ils.cstore open-ils.pcrud"
9877                 oils_obj:fieldmapper="config::filter_dialog_interface"
9878                 oils_persist:tablename="config.filter_dialog_interface"
9879                 reporter:label="FilterDialog Interface">
9880                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9881                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9882                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9883                 </fields>
9884                 <links>
9885                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9886                 </links>
9887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9888                         <actions>
9889                                 <retrieve />
9890                         </actions>
9891                 </permacrud>
9892         </class>
9893
9894         <class
9895                 id="cfdfs"
9896                 controller="open-ils.cstore open-ils.pcrud"
9897                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9898                 oils_persist:tablename="config.filter_dialog_filter_set"
9899                 reporter:label="FilterDialog Filter Set">
9900                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9901                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9902                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9903                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9904                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9905                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9906                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9907                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9908                 </fields>
9909                 <links>
9910                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9911                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9912                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9913                 </links>
9914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9915                         <actions>
9916                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9917                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9918                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9919                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9920                         </actions>
9921                 </permacrud>
9922
9923         </class>
9924
9925         <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">
9926                 <fields oils_persist:primary="code">
9927                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9928                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9929                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9930                 </fields>
9931                 <links/>
9932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9933                         <actions>
9934                                 <retrieve/>
9935                         </actions>
9936                 </permacrud>
9937         </class>
9938
9939         <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">
9940                 <oils_persist:source_definition>
9941
9942             SELECT  b.id,
9943                     MAX(dcp.edit_date) AS last_delete_date
9944              FROM   biblio.record_entry b
9945                     JOIN asset.call_number cn ON (cn.record = b.id)
9946                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9947              WHERE  NOT b.deleted
9948              GROUP BY b.id
9949              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9950
9951                 </oils_persist:source_definition>
9952                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9953                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9954                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9955                 </fields>
9956                 <links>
9957                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9958                 </links>
9959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9960                         <actions>
9961                                 <retrieve/>
9962                         </actions>
9963                 </permacrud>
9964         </class>
9965
9966         <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">
9967                 <oils_persist:source_definition>
9968
9969             -- -- 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.
9970             -- -- 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
9971             -- -- may not.
9972             -- SELECT
9973             --     bre.id AS "bib_id",
9974             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9975             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9976             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9977             -- FROM (
9978                 SELECT
9979                     y.bre AS "id",
9980                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9981                     y.hold_count AS "hold_count",
9982                     (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"
9983                 FROM (
9984                         SELECT
9985                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9986                             COUNT(*) AS "hold_count"
9987                         FROM action.hold_request h
9988                         WHERE
9989                             cancel_time IS NULL
9990                             AND fulfillment_time IS NULL
9991                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9992                         GROUP BY 1
9993                     )y LEFT JOIN (
9994                         SELECT 
9995                             (SELECT id
9996                                 FROM biblio.record_entry 
9997                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9998                             ) AS "bre", 
9999                             COUNT(*) AS "copy_count"
10000                         FROM asset.copy
10001                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10002                         WHERE copy.holdable 
10003                             AND NOT copy.deleted 
10004                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10005                         GROUP BY 1
10006                     )x ON x.bre = y.bre
10007                 -- )z RIGHT JOIN (
10008                 --     SELECT id
10009                 --     FROM biblio.record_entry
10010                 --     WHERE NOT deleted
10011                 -- )bre ON (z.bib_id = bre.id)
10012                 
10013
10014                 </oils_persist:source_definition>
10015                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10016                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10017                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10018                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10019                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10020                 </fields>
10021                 <links>
10022                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10023                 </links>
10024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10025                         <actions>
10026                                 <retrieve/>
10027                         </actions>
10028                 </permacrud>
10029         </class>
10030
10031         <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">
10032                 <oils_persist:source_definition>
10033             SELECT *,
10034                 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,
10035                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10036             FROM
10037                 (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
10038                     FROM
10039                         action.hold_request ahr
10040                         JOIN reporter.hold_request_record rhrr USING (id)
10041                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10042                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10043                     WHERE
10044                         ahr.cancel_time IS NULL
10045                         AND ahr.fulfillment_time IS NULL
10046                     GROUP BY bib_record, pickup_lib
10047                 )x
10048                 JOIN
10049                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10050                     FROM
10051                         action.hold_request ahr
10052                         JOIN reporter.hold_request_record rhrr USING (id)
10053                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10054                     WHERE
10055                         ahr.cancel_time IS NULL
10056                         AND ahr.fulfillment_time IS NULL
10057                     GROUP BY bib_record
10058                 )y
10059                 USING (id)
10060                 </oils_persist:source_definition>
10061                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10062                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10063                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10064                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10065                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10066                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10067                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10068                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10069                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10070                 </fields>
10071                 <links>
10072                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10073                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10074                 </links>
10075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10076                         <actions>
10077                                 <retrieve/>
10078                         </actions>
10079                 </permacrud>
10080         </class>
10081
10082         <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">
10083                 <oils_persist:source_definition>
10084             SELECT
10085                 ac.id,
10086                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10087                 MAX(actac.xact_start) AS last_circ
10088             FROM asset.copy ac
10089                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10090             GROUP BY ac.id
10091
10092             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10093             --SELECT
10094             --    ac.id,
10095             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10096             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10097             --FROM asset.copy ac
10098             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10099             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10100             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10101                 </oils_persist:source_definition>
10102                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10103                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10104                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10105                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10106                 </fields>
10107                 <links>
10108                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10109                 </links>
10110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10111                         <actions>
10112                                 <retrieve/>
10113                         </actions>
10114                 </permacrud>
10115         </class>
10116
10117         <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">
10118                 <fields oils_persist:primary="id">
10119                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10120                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10121                 </fields>
10122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10123                         <actions>
10124                                 <retrieve/>
10125                         </actions>
10126                 </permacrud>
10127         </class>
10128
10129         <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">
10130                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10131                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10132                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10133                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10134                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10135                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10136                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10137                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10138                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10139                 </fields>
10140                 <links>
10141                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10142                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10143                 </links>
10144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10145                         <actions>
10146                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10147                                 <retrieve/>
10148                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10149                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10150                         </actions>
10151                 </permacrud>
10152         </class>
10153
10154         <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">
10155                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10156                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10157                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10158                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10159                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10160                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10161                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10162                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10163                 </fields>
10164                 <links>
10165                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10166                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10167                 </links>
10168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10169                         <actions>
10170                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10171                                 <retrieve/>
10172                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10173                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10174                         </actions>
10175                 </permacrud>
10176         </class>
10177
10178
10179         <!-- ********************************************************************************************************************* -->
10180         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10181         <!-- ********************************************************************************************************************* -->
10182         <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">
10183                 <fields oils_persist:primary="id">
10184                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10185                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10186                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10187                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10188                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10189                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10190                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10191                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10192                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10193                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10194                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10195                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10196                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10197                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10198                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10199                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10200                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10201                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10202                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10203                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10204                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10205                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10206                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10207                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10208                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10209                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10210                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10211                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10212                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10213                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10214                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10215                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10216                 </fields>
10217                 <links>
10218                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10219                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10220                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10221                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10222                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10223                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10224                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10225                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10226                 </links>
10227         </class>
10228
10229         <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">
10230                 <fields oils_persist:primary="id">
10231                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10232                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10233                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10234                 </fields>
10235                 <links>
10236                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10237                 </links>
10238         </class>
10239
10240         <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">
10241                 <fields oils_persist:primary="id">
10242                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10243                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10244                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10245                 </fields>
10246                 <links>
10247                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10248                 </links>
10249         </class>
10250
10251         <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">
10252                 <fields oils_persist:primary="id">
10253                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10254
10255                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10256                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10257                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10258
10259                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10260                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10261                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10262
10263                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10264                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10265
10266                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10267                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10268                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10269
10270                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10271                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10272
10273                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10274                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10275                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10276
10277                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10278                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10279                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10280
10281                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10282                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10283                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10284                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10285
10286                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10287                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10288
10289                 </fields>
10290                 <links>
10291                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10292                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10293                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10294                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10295                 </links>
10296         </class>
10297
10298         <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">
10299                 <oils_persist:source_definition>
10300
10301             SELECT
10302                 po.ordering_agency AS ordering_agency,
10303                 po.id AS purchase_order,
10304                 li.id AS lineitem,
10305                 lid.id AS lineitem_detail,
10306                 cpa.id AS claim_policy_action
10307             FROM
10308                 acq.lineitem_detail lid
10309                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10310                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10311                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10312                 JOIN acq.claim_policy_action cpa ON (
10313                     cpa.claim_policy = cp.id
10314
10315                     -- we only care about claim policy actions whose claim
10316                     -- interval we'd reached or exceeded
10317                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10318
10319                     -- filter out all claim policy actions where claim events
10320                     -- have occurred on or after the action's action_interval
10321                     AND NOT EXISTS (
10322                         SELECT 1
10323                         FROM
10324                             acq.claim_event evt
10325                             JOIN acq.claim claim ON (
10326                                 claim.id = evt.claim
10327                                 AND claim.lineitem_detail = lid.id
10328                             )
10329                         WHERE
10330                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10331                     )
10332                 )
10333             WHERE
10334                 lid.cancel_reason IS NULL
10335                 AND li.cancel_reason IS NULL -- belt/suspenders
10336                 AND po.cancel_reason IS NULL -- belt/suspenders
10337                 AND lid.recv_time IS NULL
10338                 AND po.state = 'on-order'
10339             ORDER BY 1, 2, 3, 4, 5
10340
10341                 </oils_persist:source_definition>
10342                 <fields>
10343                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10344                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10345                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10346                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10347                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10348                 </fields>
10349                 <links>
10350                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10351                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10352                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10353                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10354                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10355                 </links>
10356         </class>
10357         <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">
10358                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10359                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10360                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10361                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10362                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10363                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10364                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10365                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10366                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10367                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10368                 </fields>
10369                 <links>
10370                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10371                 </links>
10372     </class>
10373         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10374                 <oils_persist:source_definition>
10375             SELECT * FROM acq.lineitem_summary 
10376                                 WHERE item_count > (invoice_count + cancel_count)
10377         </oils_persist:source_definition>
10378                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10379                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10380                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10381                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10382                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10383                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10384                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10385                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10386                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10387                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10388                 </fields>
10389                 <links>
10390                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10391                 </links>
10392     </class>
10393         <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">
10394                 <oils_persist:source_definition>
10395
10396                         SELECT  t.*
10397                           FROM  action.transit_copy t
10398                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10399                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10400                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10401
10402                 </oils_persist:source_definition>
10403                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10404                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10405                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10406                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10407                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10408                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10409                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10410                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10411                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10412                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10413                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10414                 </fields>
10415                 <links>
10416                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10417                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10418                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10419                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10420                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10421                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10422                 </links>
10423         </class>
10424
10425     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10426                 <oils_persist:source_definition>
10427
10428         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10429                 SELECT
10430                         cp.id as copy,
10431                         COUNT(circ.id),
10432                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10433                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10434                 FROM
10435                         asset.copy cp
10436                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10437                 GROUP BY 1, 3, 4
10438                 UNION
10439                 SELECT
10440                         cp.id as copy,
10441                         COUNT(circ.id),
10442                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10443                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10444                 FROM
10445                         asset.copy cp
10446                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10447                 GROUP BY 1, 3, 4
10448                 UNION
10449                 SELECT
10450                         id as copy,
10451                         circ_count,
10452                         -1 AS year,
10453                         false as is_renewal
10454                 FROM
10455                         extend_reporter.legacy_circ_count
10456         )x GROUP BY 1, 3, 4
10457
10458                 </oils_persist:source_definition>
10459         <fields>
10460             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10461             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10462             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10463             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10464         </fields>
10465                 <links>
10466                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10467                 </links>
10468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10469                         <actions>
10470                                 <retrieve/>
10471                         </actions>
10472                 </permacrud>
10473     </class>
10474
10475         <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">
10476                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10477                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10478                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10479                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10480                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10481                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10482                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10483                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10484                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10485                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10486                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10487                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10488                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10489                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10490                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10491                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10492                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10493                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10494                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10495                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10496                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10497                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10498                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10499                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10500                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10501                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10502                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10503                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10504                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10505                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10506                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10507                 </fields>
10508                 <links>
10509                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10510                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10511                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10512                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10513                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10514                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10515                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10516                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10517                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10518                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10519                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10520                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10521                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10522                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10523                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10524                 </links>
10525         </class>
10526
10527     <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">
10528         <fields oils_persist:primary="id">
10529             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10530             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10531             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10532             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10533             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10534             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10535             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10536             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10537             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10538             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10539             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10540             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10541             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10542             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10543             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10544             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10545             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10546             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10547             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10548             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10549             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10550             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10551             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10552             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10553             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10554             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10555             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10556             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10557             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10558             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10559             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10560             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10561             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10562             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10563         </fields>
10564         <links>
10565             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10566             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10567             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10568             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10569             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10570         </links>
10571     </class>
10572
10573     <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">
10574         <fields oils_persist:primary="id">
10575             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10576             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10577             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10578             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10579         </fields>
10580         <links>
10581             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10582             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10583         </links>
10584     </class>
10585
10586     <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">
10587         <fields oils_persist:primary="owning_lib">
10588             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10589             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10590             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10591         </fields>
10592         <links>
10593             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10594         </links>
10595     </class>
10596
10597     <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">
10598         <fields oils_persist:primary="id">
10599             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10600             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10601             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10602             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10603             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10604         </fields>
10605         <links>
10606             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10607             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10608             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10609         </links>
10610     </class>
10611
10612     <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">
10613         <fields oils_persist:primary="circ_lib">
10614             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10615             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10616             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10617             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10618         </fields>
10619         <links>
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="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">
10626         <fields oils_persist:primary="id">
10627             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10628             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10629             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10630             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10631             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10632         </fields>
10633         <links>
10634             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10635             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10636             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10637         </links>
10638     </class>
10639
10640     <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">
10641         <fields oils_persist:primary="home_ou">
10642             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10643             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10644             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10645             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10646         </fields>
10647         <links>
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         <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">
10653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10654                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10655                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10656                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10657                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10658                 </fields>
10659                 <links>
10660                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10661                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10662                 </links>
10663                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10664                         <actions>
10665                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10666                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10667                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10668                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10669                         </actions>
10670                 </permacrud>
10671         </class>
10672         <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">
10673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10674                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10675                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10676                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10677                 </fields>
10678                 <links>
10679                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10680                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10681                         </links>
10682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10683                 <actions>
10684                                 <create permission="ADMIN_ACQ_FUND_TAG">
10685                                         <context link="tag" field="owner"/>
10686                                 </create>
10687                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10688                                         <context link="tag" field="owner"/>
10689                                 </retrieve>
10690                                 <update permission="ADMIN_ACQ_FUND_TAG">
10691                                         <context link="tag" field="owner"/>
10692                                 </update>
10693                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10694                                         <context link="tag" field="owner"/>
10695                                 </delete>
10696                         </actions>
10697                 </permacrud>
10698         </class>
10699         <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">
10700                 <oils_persist:source_definition><![CDATA[
10701                 SELECT
10702                         poi.purchase_order AS purchase_order,
10703                         ii.invoice AS invoice,
10704                         NULL AS lineitem,
10705                         poi.id AS po_item,
10706                         NULL AS picklist
10707                 FROM
10708                         acq.po_item poi
10709                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10710                 UNION SELECT
10711                         jub.purchase_order AS purchase_order,
10712                         ie.invoice AS invoice,
10713                         jub.id AS lineitem,
10714                         NULL AS po_item,
10715                         jub.picklist AS picklist
10716                 FROM
10717                         acq.lineitem jub
10718                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10719                 UNION SELECT
10720                         ii.purchase_order AS purchase_order,
10721                         ii.invoice AS invoice,
10722                         NULL AS lineitem,
10723                         NULL AS po_item,
10724                         NULL AS picklist
10725                 FROM
10726                         acq.invoice_item ii
10727                 WHERE ii.po_item IS NULL
10728                 UNION SELECT
10729                         ie.purchase_order AS purchase_order,
10730                         ie.invoice AS invoice,
10731                         NULL AS lineitem,
10732                         NULL AS po_item,
10733                         NULL AS picklist
10734                 FROM
10735                         acq.invoice_entry ie
10736                 WHERE ie.lineitem IS NULL
10737                 UNION SELECT
10738                         NULL AS purchase_order,
10739                         NULL AS invoice,
10740                         jub.id AS lineitem,
10741                         NULL AS po_item,
10742                         jub.picklist AS picklist
10743                 FROM
10744                         acq.lineitem jub
10745                 WHERE jub.purchase_order IS NULL
10746                 ]]></oils_persist:source_definition>
10747                 <fields>
10748                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10749                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10750                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10751                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10752                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10753                 </fields>
10754                 <links>
10755                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10756                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10757                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10758                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10759                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10760                 </links>
10761         </class>
10762         <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">
10763                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10765                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10766                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10767                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10768                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10769                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10770                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10771                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10772                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10773                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10774                 </fields>
10775                 <links>
10776                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10777                 </links>
10778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10779                         <actions>
10780                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10781                                 <retrieve/>
10782                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10783                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10784                         </actions>
10785                 </permacrud>
10786         </class>
10787
10788         <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">
10789                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10790                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10791                         <field name="date_applied" reporter:datatype="timestamp"/>
10792                         <field name="org" reporter:datatype="org_unit"/>
10793                         <field name="original_value" reporter:datatype="text"/>
10794                         <field name="new_value" reporter:datatype="text"/>
10795                         <field name="field_name" reporter:datatype="link"/>
10796                 </fields>
10797                 <links>
10798                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10799                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10800                 </links>
10801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10802                         <actions>
10803                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10804                                 <retrieve/>
10805                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10806                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10807                         </actions>
10808                 </permacrud>
10809         </class>
10810         <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">
10811                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10813                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10814                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10815                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10816                 </fields>
10817                 <links>
10818                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10819                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10820                 </links>
10821         </class>
10822         <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">
10823                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10824                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10825                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10826                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10827                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10828                 </fields>
10829                 <links>
10830                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10831                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10832                 </links>
10833         </class>
10834
10835
10836         <!-- ********************************************************************************************************************* -->
10837
10838 </IDL>
10839
10840 <!--
10841     vim:noet:ts=4:sw=4:
10842 -->