]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
4686e7febe1e72633449b0d7df0ddb6472273f25
[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                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <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">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                 </fields>
204                 <links>
205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
206                 </links>
207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
208                         <actions>
209                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
210                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
211                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
212                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
213                         </actions>
214                 </permacrud>
215         </class>
216
217         <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">
218                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
219                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
220                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
221                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
222                 </fields>
223                 <links>
224                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
225                 </links>
226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
227                         <actions>
228                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
229                     <context link="grp" field="owner"/>
230                 </create>
231                                 <retrieve/>
232                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
233                     <context link="grp" field="owner"/>
234                 </update>
235                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </delete>
238                         </actions>
239                 </permacrud>
240         </class>
241
242         <class  id="vibtg" 
243             controller="open-ils.cstore open-ils.pcrud" 
244             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
245             oils_persist:tablename="vandelay.import_bib_trash_group" 
246             reporter:label="Import/Overlay Field Groups for Removal">
247                 <fields oils_persist:primary="id" 
248                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
249                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
250                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
252                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
253                 </fields>
254                 <links>
255                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
256                 </links>
257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
258                         <actions>
259                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
260                                 <retrieve/>
261                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267
268         <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">
269                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
270                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
271                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
272                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
273                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
274                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
275                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
276                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
278                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
279                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
280                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
281                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
282                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
283                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
286                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
287                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
288                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
289                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
290                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
291                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
292                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
293                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
294                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
295                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
296                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
297                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
351                 </fields>
352                 <links>
353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
354                 </links>
355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
356                         <actions>
357                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                                 <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"/>
359                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
361                         </actions>
362                 </permacrud>
363         </class>
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
367                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
368                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
369                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
370                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
371                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
372                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
373                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
374                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
375                 </fields>
376                 <links>
377                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
378                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
379                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
380                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
381                 </links>
382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
383                         <actions>
384                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
387                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
388                         </actions>
389                 </permacrud>
390         </class>
391
392         <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">
393                 <fields oils_persist:primary="code">
394                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
395                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
396                 </fields>
397                 <links>
398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
399                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <retrieve/>
405                         </actions>
406                 </permacrud>
407         </class>
408
409         <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">
410                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
411                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
412                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
414                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
415                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
416                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
417                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
418                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
419                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
420                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
421                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
424                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
425                 </fields>
426                 <links>
427                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
428                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
429                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
430                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
431             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
432             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
433             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
434                 </links>
435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
436                         <actions>
437                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
440                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
441                         </actions>
442                 </permacrud>
443         </class>
444
445         <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">
446                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
447                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
448                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
449                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
450                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
451                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
452                 </fields>
453                 <links/>
454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
455                         <actions>
456                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
457                 <retrieve/>
458                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
460                         </actions>
461                 </permacrud>
462         </class>
463
464         <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">
465                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
466                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
467                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
468                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
469                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
470                 </fields>
471                 <links>
472                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
473                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
474                 </links>
475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
476                         <actions>
477                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                         </actions>
482                 </permacrud>
483         </class>
484
485         <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">
486                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
487                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
488                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
489                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
490                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
491                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
492                 </fields>
493                 <links>
494                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
495                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
502                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
509                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
510                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
511                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
512                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
513                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
514                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
515                 </fields>
516                 <links>
517                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
518                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
519                 </links>
520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
521                         <actions>
522                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                         </actions>
527                 </permacrud>
528         </class>
529
530         <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">
531                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
532                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
533                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
535                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
536                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
537                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
538                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
539                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
540                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
541                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
543                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
544                 </fields>
545                 <links>
546                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
547                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
548                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
549             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
550             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
551                 </links>
552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
553                         <actions>
554                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                         </actions>
559                 </permacrud>
560         </class>
561
562         <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">
563                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
565                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
566                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
567                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
568                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
569                 </fields>
570                 <links/>
571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
572                         <actions>
573                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                 <retrieve/>
575                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
577                         </actions>
578                 </permacrud>
579         </class>
580
581         <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">
582                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
583                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
584                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
585                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
586                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
590                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <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">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
604                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
605                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
606                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
607                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
608                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
609                 </fields>
610                 <links>
611                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
612                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
626                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
627                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
628                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
629                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
630                 </fields>
631                 <links>
632                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
633                 </links>
634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
635                         <actions>
636                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
638                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
639                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
640                         </actions>
641                 </permacrud>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
646                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
647                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
648                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
649                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
650                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
651                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
652                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
653             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
654                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
655                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
656                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
657                 </fields>
658                 <links>
659                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
660                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
661                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
662                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
663                 </links>
664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665                         <actions>
666                                 <create permission="ADMIN_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </create>
669                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </retrieve>
672                                 <update permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </update>
675                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
676                     <context link="match_set" field="owner"/>
677                                 </delete>
678                         </actions>
679                 </permacrud>
680         </class>
681
682         <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">
683                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
684                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
685                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
686                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
687                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
688                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
689                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
690                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
691                 </fields>
692                 <links>
693                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
694                 </links>
695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
696                         <actions>
697                                 <create permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </create>
700                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </retrieve>
703                                 <update permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </update>
706                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
707                     <context link="match_set" field="owner"/>
708                                 </delete>
709                         </actions>
710                 </permacrud>
711         </class>
712
713         <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">
714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
715                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
716                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
717                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
718                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
719                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
720                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
721                 </fields>
722                 <links>
723                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
724                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
725                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
726                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
727                 </links>
728         </class>
729
730     <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">
731         <fields oils_persist:primary="name">
732             <field reporter:label="Name" name="name" reporter:datatype="text"/>
733             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
734             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
735             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
736         </fields>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
741                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
742                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
743             </actions>
744         </permacrud>
745     </class>
746
747     <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">
748         <fields oils_persist:primary="id">
749             <field reporter:label="ID" name="id" reporter:datatype="id"/>
750             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
751             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
752             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
753             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
754         </fields>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <retrieve/>
759                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761             </actions>
762         </permacrud>
763     </class>
764
765         <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">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
769                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
770                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
771                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
772                 </fields>
773                 <links>
774                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
775                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
776                 </links>
777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
778             <actions>
779                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780                 <retrieve/>
781                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
782                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
783             </actions>
784         </permacrud>
785         </class>
786
787         <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">
788                 <fields oils_persist:primary="name">
789                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
790                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
791                         <field reporter:label="Description" name="description" reporter:datatype="text" />
792                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
793                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
794                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
795                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
796                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
797                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
798                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
799                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
800                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
801                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
802                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
803                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
804                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
805                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
806                 </fields>
807                 <links>
808                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
809                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
810                 </links>
811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
812             <actions>
813                 <create permission="ADMIN_SVF" global_required="true"/>
814                 <retrieve/>
815                 <update permission="ADMIN_SVF" global_required="true"/>
816                 <delete permission="ADMIN_SVF" global_required="true"/>
817             </actions>
818         </permacrud>
819         </class>
820
821         <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">
822                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
824                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
825                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
826             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
827                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
828                 </fields>
829                 <links/>
830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
831             <actions>
832                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
833                 <retrieve/>
834                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
835                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
836             </actions>
837         </permacrud>
838         </class>
839
840         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
841                 <fields oils_persist:primary="coded_value">
842                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
843                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
844                 </fields>
845                 <links>
846                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
847                 </links>
848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
849             <actions>
850                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
851                 <retrieve/>
852                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
853                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
854             </actions>
855         </permacrud>
856         </class>
857
858         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
859                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
860                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
861                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
862                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
863                 </fields>
864                 <links>
865                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
866                 </links>
867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
868             <actions>
869                 <retrieve/>
870             </actions>
871         </permacrud>
872         </class>
873
874
875         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
876                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
877                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
878                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
879                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
880                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
881                 </fields>
882                 <links>
883                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
884                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
885                 </links>
886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887             <actions>
888                 <retrieve/>
889             </actions>
890         </permacrud>
891         </class>
892
893
894         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
895                 <fields oils_persist:primary="source">
896                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
897                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
898                 </fields>
899                 <links>
900                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
901                 </links>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <retrieve/>
905             </actions>
906         </permacrud>
907         </class>
908
909         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
910                 <fields>
911                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
912                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
913                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
914                 </fields>
915                 <links>
916                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <retrieve/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <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" oils_persist:readonly="true">
926                 <fields oils_persist:primary="id">
927                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
928                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
929                 </fields>
930                 <links>
931                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
932                 </links>
933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
934             <actions>
935                 <retrieve/>
936             </actions>
937         </permacrud>
938         </class>
939
940         <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">
941                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
942                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
943                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
944                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
945                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
946                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
947                 </fields>
948                 <links>
949                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
950                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
951                 </links>
952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
953             <actions>
954                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
955                 <retrieve/>
956                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
957                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
958             </actions>
959         </permacrud>
960         </class>
961
962         <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">
963                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
964                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
965                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
966                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
967                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
968                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
969                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
970                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
971             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
972             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
973                 </fields>
974                 <links>
975                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
976                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
977                 </links>
978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
979             <actions>
980                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
981                 <retrieve/>
982                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
983                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
984             </actions>
985         </permacrud>
986         </class>
987
988         <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">
989                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
990                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
991                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
992                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
993                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
994                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
995                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
996                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
997                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
998                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
999                 </fields>
1000                 <links>
1001                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1002                 </links>
1003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1004             <actions>
1005                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1006                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1007                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1008                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1009             </actions>
1010         </permacrud>
1011         </class>
1012
1013     <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">
1014         <fields oils_persist:primary="name">
1015             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1016             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1017             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1018             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1019             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1020             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1021             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1022             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1023             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1024             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1025         </fields>
1026         <links>
1027             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1028             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1029         </links>
1030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031             <actions>
1032                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1033                 <retrieve/>
1034                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1035                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1036             </actions>
1037         </permacrud>
1038     </class>
1039
1040     <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">
1041         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1042             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1043             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1044             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1045             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1046             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1047             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1048             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1049         </fields>
1050         <links>
1051             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1052         </links>
1053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1054             <actions>
1055                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1056                 <retrieve/>
1057                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1058                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1059             </actions>
1060         </permacrud>
1061     </class>
1062
1063     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1064                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1065                         oils_persist:tablename="config.z3950_index_field_map" 
1066                         reporter:label="Z39.50 Index Field Map">
1067         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1068             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1069             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1070             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1071             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1072             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1073             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1074         </fields>
1075         <links>
1076             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1077             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1078             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1079         </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1083                 <retrieve/>
1084                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1085                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1086             </actions>
1087         </permacrud>
1088     </class>
1089
1090
1091         <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">
1092                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1093                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1094                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1095                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1096                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1097                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1098                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1099                 </fields>
1100                 <links>
1101             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1102             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1103                 </links>
1104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1105                         <actions>
1106                                 <retrieve/>
1107                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1108                         </actions>
1109                 </permacrud>
1110         </class>
1111
1112         <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">
1113                 <fields oils_persist:primary="key">
1114                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1115                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1116                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1117                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1118                 </fields>
1119                 <links/>
1120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1121                         <actions>
1122                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1123                                 <retrieve/>
1124                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1125                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1126                         </actions>
1127                 </permacrud>
1128         </class>
1129
1130         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1131                 <fields oils_persist:primary="module">
1132                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1133                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1134                 </fields>
1135                 <links/>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="module">
1140                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1141                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1142                 </fields>
1143                 <links/>
1144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1145                         <actions>
1146                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1147                                 <retrieve/>
1148                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1149                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1150                         </actions>
1151                 </permacrud>
1152         </class>
1153
1154         <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">
1155                 <fields oils_persist:primary="module">
1156                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1157                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1158                 </fields>
1159                 <links/>
1160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1161                         <actions>
1162                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1163                                 <retrieve/>
1164                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1165                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1166                         </actions>
1167                 </permacrud>
1168         </class>
1169
1170         <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">
1171                 <fields oils_persist:primary="module">
1172                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1173                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1174                 </fields>
1175                 <links/>
1176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1177                         <actions>
1178                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1179                                 <retrieve/>
1180                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1181                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1182                         </actions>
1183                 </permacrud>
1184         </class>
1185
1186         <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">
1187                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1188                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1189                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1190                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1191                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1192                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1193                 </fields>
1194                 <links>
1195                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1196                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1197                 </links>
1198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1199                         <actions>
1200                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1201                     <context link="event_def" field="owner"/>
1202                 </create>
1203                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1204                     <context link="event_def" field="owner"/>
1205                 </retrieve>
1206                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1207                     <context link="event_def" field="owner"/>
1208                 </update>
1209                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1210                     <context link="event_def" field="owner"/>
1211                 </delete>
1212                         </actions>
1213                 </permacrud>
1214         </class>
1215
1216         <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">
1217                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1218                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1219                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1220                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1221                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1222                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1223                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1224                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1225                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1226                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1227                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1228                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1229                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1230                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1231                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1232                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1233                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1234                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1235                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1236                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1237                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1238                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1239                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1240                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1241                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1242                 </fields>
1243                 <links>
1244                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1245                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1246                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1247                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1248                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1249                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1250                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1251                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1252                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1253                 </links>
1254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1255                         <actions>
1256                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1257                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1258                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1259                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1260                         </actions>
1261                 </permacrud>
1262         </class>
1263
1264         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1265                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1266                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1267                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1268                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1269                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1270                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1271                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1272                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1273                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1274                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1275                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1276                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1277                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1278                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1279                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1280                 </fields>
1281                 <links>
1282                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1283                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1284                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1285                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1286                 </links>
1287         </class>
1288
1289         <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">
1290                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1291                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1292                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1293                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1294                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1295                 </fields>
1296                 <links>
1297                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1298                 </links>
1299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1300                         <actions>
1301                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1302                     <context link="event_def" field="owner"/>
1303                 </create>
1304                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1305                     <context link="event_def" field="owner"/>
1306                 </retrieve>
1307                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1308                     <context link="event_def" field="owner"/>
1309                 </update>
1310                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1311                     <context link="event_def" field="owner"/>
1312                 </delete>
1313                         </actions>
1314                 </permacrud>
1315         </class>
1316
1317         <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">
1318                 <oils_persist:source_definition><![CDATA[
1319                 SELECT  atevdef.hook,
1320                         atevdef.name,
1321                         atevdef.reactor,
1322                         atev.id,
1323                         atev.event_def,
1324                         atev.add_time,
1325                         atev.run_time,
1326                         atev.start_time,
1327                         atev.update_time,
1328                         atev.complete_time,
1329                         atev.update_process,
1330                         atev.state,
1331                         atev.user_data,
1332                         atev.template_output,
1333                         atev.error_output,
1334                         atev.async_output,
1335                         targ_circ.id AS target_circ,
1336                         targ_ahr.id AS target_hold,
1337                         COALESCE(
1338                                 targ_circ.circ_lib,
1339                                 targ_ahr.pickup_lib
1340                         ) AS perm_lib
1341                 FROM action_trigger.event atev
1342                 JOIN action_trigger.event_definition atevdef ON
1343                         (atevdef.id = atev.event_def)
1344                 JOIN action_trigger.hook ath ON
1345                         (ath.key = atevdef.hook)
1346                 LEFT JOIN action.circulation targ_circ ON
1347                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1348                 LEFT JOIN action.hold_request targ_ahr ON
1349                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1350                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1351                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1352                                 'circ.staff.max_visible_event_age',
1353                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1354                         ) UNION
1355                         SELECT '1000 YEARS'::INTERVAL AS value
1356                 ) ous)
1357                 ]]></oils_persist:source_definition>
1358                 <fields oils_persist:primary="id">
1359                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1360                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1361                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1362                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1363                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1364                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1365                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1366                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1367                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1368                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1369                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1370                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1371                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1372                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1373                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1374                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1375                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1376                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1377                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1378                 </fields>
1379                 <links>
1380                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1381                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1382                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1383                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1384                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1385                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1386                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1387                 </links>
1388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1389                         <actions>
1390                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1391                         </actions>
1392                 </permacrud>
1393         </class>
1394
1395         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1396                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1397                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1398                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1399                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1400                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1401                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1402                 </fields>
1403                 <links>
1404                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1405                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1406                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1407                 </links>
1408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1409                         <actions>
1410                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1411                         </actions>
1412                 </permacrud>
1413         </class>
1414
1415         <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">
1416                 <fields oils_persist:primary="code">
1417                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1418                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1419                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1420                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1421                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1422                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1423                 </fields>
1424                 <links/>
1425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1426             <actions>
1427                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1428                 <retrieve/>
1429                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1430                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1431             </actions>
1432         </permacrud>
1433         </class>
1434
1435         <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">
1436                 <fields oils_persist:primary="code">
1437                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1438                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1439                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1440                 </fields>
1441                 <links/>
1442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1443             <actions>
1444                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1445                 <retrieve/>
1446                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1447                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1448             </actions>
1449         </permacrud>
1450         </class>
1451
1452         <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">
1453                 <fields oils_persist:primary="code">
1454                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1455                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1456                 </fields>
1457                 <links/>
1458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1459             <actions>
1460                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1461                 <retrieve/>
1462                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1463                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1464             </actions>
1465         </permacrud>
1466         </class>
1467
1468         <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">
1469                 <fields oils_persist:primary="code">
1470                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1471                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1472                 </fields>
1473                 <links/>
1474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1475             <actions>
1476                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1477                 <retrieve/>
1478                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1479                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1480             </actions>
1481         </permacrud>
1482         </class>
1483
1484         <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">
1485                 <fields oils_persist:primary="code">
1486                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1487                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1488                 </fields>
1489                 <links/>
1490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1491             <actions>
1492                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1493                 <retrieve/>
1494                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1495                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1496             </actions>
1497         </permacrud>
1498         </class>
1499
1500         <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">
1501                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1502                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1503                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1504                 </fields>
1505                 <links/>
1506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1507             <actions>
1508                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1509                 <retrieve/>
1510                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1511                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1512             </actions>
1513         </permacrud>
1514         </class>
1515
1516         <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">
1517                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1518                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1519                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1520                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1521                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1522                 </fields>
1523         <links>
1524             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1525             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1526             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1527         </links>
1528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1529             <actions>
1530                 <create permission="UPDATE_COPY">
1531                     <context link="target_copy" field="circ_lib"/>
1532                 </create>
1533                 <retrieve/>
1534                 <update permission="UPDATE_COPY">
1535                     <context link="target_copy" field="circ_lib"/>
1536                 </update>
1537                 <delete permission="UPDATE_COPY">
1538                     <context link="target_copy" field="circ_lib"/>
1539                 </delete>
1540             </actions>
1541         </permacrud>
1542         </class>
1543
1544         <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">
1545                 <fields oils_persist:primary="code">
1546                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1547                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1548                 </fields>
1549                 <links/>
1550         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1551             <actions>
1552                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1553                 <retrieve/>
1554                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1555                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1556             </actions>
1557         </permacrud>
1558         </class>
1559
1560         <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">
1561                 <fields oils_persist:primary="code">
1562                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1563                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1564                 </fields>
1565                 <links/>
1566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1567             <actions>
1568                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1569                 <retrieve/>
1570                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1571                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1572             </actions>
1573         </permacrud>
1574         </class>
1575
1576         <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">
1577                 <fields oils_persist:primary="code">
1578                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1579                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1580                 </fields>
1581                 <links/>
1582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1583             <actions>
1584                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1585                 <retrieve/>
1586                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1587                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1588             </actions>
1589         </permacrud>
1590         </class>
1591
1592     <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">
1593         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1594             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1595             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1596             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1597             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1598             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1599             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1600             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1601             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1602             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1603             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1604             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1605             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1606             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1607             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1608             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1609             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1610             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1611         </fields>
1612         <links/>
1613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1614             <actions>
1615                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1616                 <retrieve/>
1617                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1618                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1619             </actions>
1620         </permacrud>
1621     </class>
1622
1623     <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">
1624         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1625             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1626             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1627             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1628             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1629             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1630             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1631             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1632             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1633             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1634             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1635             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1636             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1637             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1638             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1639             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1640             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1641             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1642             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1643             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1644         </fields>
1645         <links/>
1646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1647             <actions>
1648                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1649                 <retrieve/>
1650                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1651                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1652             </actions>
1653         </permacrud>
1654     </class>
1655
1656     <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">
1657         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1658             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1659             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1660             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1661             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1662             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1663         </fields>
1664         <links>
1665             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1666             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1667             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1668         </links>
1669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1670             <actions>
1671                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1672                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1673                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1674                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1675             </actions>
1676         </permacrud>
1677     </class>
1678
1679         <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">
1680                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1681                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1682                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1683                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1684                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1685                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1686                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1687                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1688                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1689                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1690                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1691                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1692                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1693                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1694                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1695                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1696                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1697             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1698                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1699                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1700                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1701                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1702                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1703                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1704                 </fields>
1705                 <links>
1706                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1707                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1708                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1709                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1710                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1711                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1712                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1713                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1714                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1715                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1716                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1717                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1718                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1719             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1720                 </links>
1721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1722             <actions>
1723                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1724                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1725                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1726                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1727             </actions>
1728         </permacrud>
1729         </class>
1730
1731         <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">
1732                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1733                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1734                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1735                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1736                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1737                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1738                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1739                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1740                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1741                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1742                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1743                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1744                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1745                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1746                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1747                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1748             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1749                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1750                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1751             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1752                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1753                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1754                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1755                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1756             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1757             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1758             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1759                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1760                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1761                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1762                 </fields>
1763                 <links>
1764                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1765                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1766                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1767                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1768                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1769                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1770                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1771                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1772                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1773                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1774                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1775                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1776                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1777                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1778             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1779                 </links>
1780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1781             <actions>
1782                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1783                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1784                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1785                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1786             </actions>
1787         </permacrud>
1788         </class>
1789
1790     <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">
1791         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1792             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1793             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1794             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1795         </fields>
1796         <links/>
1797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1798             <actions>
1799                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1800                 <retrieve/>
1801                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1802                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1803             </actions>
1804         </permacrud>
1805     </class>
1806
1807     <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">
1808         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1809             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1810             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1811             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1812             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1813             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1814             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1815             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1816         </fields>
1817         <links>
1818             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1819         </links>
1820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1821             <actions>
1822                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1823                 <retrieve/>
1824                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1825                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1826             </actions>
1827         </permacrud>
1828     </class>
1829
1830     <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">
1831         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1832             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1833             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1834             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1835             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1836             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1837         </fields>
1838         <links>
1839             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1840             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1841         </links>
1842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1843             <actions>
1844                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1845                     <context link="matchpoint" field="org_unit"/>
1846                 </create>
1847                 <retrieve/>
1848                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1849                     <context link="matchpoint" field="org_unit"/>
1850                 </update>
1851                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1852                     <context link="matchpoint" field="org_unit"/>
1853                 </delete>
1854             </actions>
1855         </permacrud>
1856     </class>
1857
1858     <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">
1859         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1860             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1861             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1862             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1863         </fields>
1864         <links>
1865             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1866             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1867         </links>
1868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1869             <actions>
1870                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1871                     <context link="limit_set" field="owning_lib"/>
1872                 </create>
1873                 <retrieve/>
1874                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1875                     <context link="limit_set" field="owning_lib"/>
1876                 </update>
1877                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1878                     <context link="limit_set" field="owning_lib"/>
1879                 </delete>
1880             </actions>
1881         </permacrud>
1882     </class>
1883     <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">
1884         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1885             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1886             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1887             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1888         </fields>
1889         <links>
1890             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1891             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1892         </links>
1893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1894             <actions>
1895                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1896                     <context link="limit_set" field="owning_lib"/>
1897                 </create>
1898                 <retrieve/>
1899                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1900                     <context link="limit_set" field="owning_lib"/>
1901                 </update>
1902                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1903                     <context link="limit_set" field="owning_lib"/>
1904                 </delete>
1905             </actions>
1906         </permacrud>
1907     </class>
1908
1909     <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">
1910         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1911             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1912             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1913             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1914             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1915         </fields>
1916         <links>
1917             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1918             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1919         </links>
1920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1921             <actions>
1922                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1923                     <context link="limit_set" field="owning_lib"/>
1924                 </create>
1925                 <retrieve/>
1926                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1927                     <context link="limit_set" field="owning_lib"/>
1928                 </update>
1929                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1930                     <context link="limit_set" field="owning_lib"/>
1931                 </delete>
1932             </actions>
1933         </permacrud>
1934     </class>
1935
1936         <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">
1937                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1938                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1939                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1940                 </fields>
1941                 <links/>
1942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1943             <actions>
1944                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1945                 <retrieve/>
1946                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1947                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1948             </actions>
1949         </permacrud>
1950         </class>
1951
1952         <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">
1953                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1954                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1955                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1956                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1957                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1958                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1959                 </fields>
1960                 <links>
1961                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1962                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1963                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1964                 </links>
1965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1966             <actions>
1967                 <create permission="ADMIN_SURVEY">
1968                     <context link="survey" field="owner"/>
1969                 </create>
1970                 <retrieve/>
1971                 <update permission="ADMIN_SURVEY">
1972                     <context link="survey" field="owner"/>
1973                 </update>
1974                 <delete permission="ADMIN_SURVEY">
1975                     <context link="survey" field="owner"/>
1976                 </delete>
1977             </actions>
1978         </permacrud>
1979         </class>
1980         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1981                 <fields oils_persist:primary="id" oils_persist:sequence="">
1982                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1983                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1984                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1985                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1986                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1987                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1988                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1989                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1990                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1991                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1992                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1993                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1994                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1995                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1996                 </fields>
1997                 <links>
1998                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1999                 </links>
2000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2001                         <actions>
2002                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2003                                         <context link="usr" field="home_ou" />
2004                                 </retrieve>
2005                         </actions>
2006                 </permacrud>
2007         </class>
2008         <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">
2009                 <fields oils_persist:primary="id" oils_persist:sequence="">
2010                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2011                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2012                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2013                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2014                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2015                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2016                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2017                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2018                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2019                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2020                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2021                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2022                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2023                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2024                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2025                 </fields>
2026                 <links>
2027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2028                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2029                 </links>
2030         </class>
2031         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2032                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2033                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2034                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2035                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2036                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2037                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2038                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2039                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2040                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2041                 </fields>
2042                 <links>
2043                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2044                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2045                 </links>
2046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2047                         <actions> <!-- created magically, so no create action -->
2048                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2049                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2050                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2051                         </actions>
2052                 </permacrud>
2053         </class>
2054         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2056                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2057                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2058                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2059                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2060                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2061                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2062                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2063                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2064                 </fields>
2065                 <links>
2066                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2067                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2068                 </links>
2069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2070                         <actions> <!-- created magically, so no create action -->
2071                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2072                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2073                         </actions>
2074                 </permacrud>
2075         </class>
2076         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2077                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2078                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2079                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2080                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2081                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2082                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2083                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2084                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2085                 </fields>
2086                 <links>
2087                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2088                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2089                 </links>
2090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2091             <actions>
2092                 <create permission="UPDATE_USER" context_field="owner">
2093                     <context link="usr" field="home_ou"/>
2094                 </create>
2095                                 <!-- note: public notes are still accessible via API -->
2096                 <retrieve permission="UPDATE_USER">
2097                     <context link="usr" field="home_ou"/>
2098                                 </retrieve>
2099                 <update permission="UPDATE_USER">
2100                     <context link="usr" field="home_ou"/>
2101                                 </update>
2102                 <delete permission="UPDATE_USER">
2103                     <context link="usr" field="home_ou"/>
2104                                 </delete>
2105             </actions>
2106         </permacrud>
2107         </class>
2108         <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">
2109                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2110                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2111                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2112                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2113                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2114                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2115                 </fields>
2116                 <links>
2117                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2118                 </links>
2119         </class>
2120         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2121                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2122                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2123                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2124                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2125                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2126                 </fields>
2127                 <links>
2128                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2129                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2130                 </links>
2131         </class>
2132         <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">
2133                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2134                         <field name="field" reporter:datatype="link"/>
2135                         <field name="id" reporter:datatype="id" />
2136                         <field name="source" reporter:datatype="link"/>
2137                         <field name="value" reporter:datatype="text"/>
2138                 </fields>
2139                 <links>
2140                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2141                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2142                 </links>
2143         </class>
2144         <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">
2145                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2146                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2147                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2148                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2149                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2150                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2151                 </fields>
2152                 <links>
2153                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2154                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2155                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2156                 </links>
2157         </class>
2158         <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">
2159                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2160                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2161                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2162                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2163                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2164                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2165                 </fields>
2166                 <links>
2167                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2168                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2169                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2170                 </links>
2171         </class>
2172         <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">
2173                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2174                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2175                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2176                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2177                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2178                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2179                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2180                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2181                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2182                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2183                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2184                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2185                 </fields>
2186                 <links>
2187                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2188                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2189                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2190                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2191                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2192                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2193                 </links>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="TRANSIT_COPY" context_field="owner">
2197                     <context link="target_copy" field="circ_lib"/>
2198                 </create>
2199                 <retrieve/>
2200                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2201                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2202             </actions>
2203         </permacrud>
2204         </class>
2205         <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">
2206                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2207                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2208                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2209                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2210                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2211                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2212                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2213                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2214                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2215                 </fields>
2216                 <links>
2217                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2218                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2219                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2220                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2221                 </links>
2222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2223             <actions>
2224                 <create permission="ADMIN_SURVEY">
2225                     <context link="survey" field="owner"/>
2226                 </create>
2227                 <retrieve/>
2228                 <update permission="ADMIN_SURVEY">
2229                     <context link="survey" field="owner"/>
2230                 </update>
2231                 <delete permission="ADMIN_SURVEY">
2232                     <context link="survey" field="owner"/>
2233                 </delete>
2234             </actions>
2235         </permacrud>
2236         </class>
2237         <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">
2238                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2239                         <field name="bucket" />
2240                         <field name="id" reporter:datatype="id" />
2241                         <field name="target_copy" reporter:datatype="link"/>
2242                         <field name="create_time" reporter:datatype="timestamp" />
2243                         <field name="pos" reporter:datatype="int" />
2244                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2245                 </fields>
2246                 <links>
2247                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2248                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2249             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2250                 </links>
2251         </class>
2252         <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">
2253                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2254                         <field name="id" reporter:datatype="id" />
2255                         <field name="item" reporter:datatype="link"/>
2256                         <field name="note" reporter:datatype="text" />
2257                 </fields>
2258                 <links>
2259                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2260                 </links>
2261         </class>
2262
2263         <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">
2264                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2265                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2267                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2268                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2269                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2270                 </fields>
2271                 <links>
2272                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2273                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2274                 </links>
2275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2276                         <actions>
2277                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2278                                 <retrieve/>
2279                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2280                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2281                         </actions>
2282                 </permacrud>
2283         </class>
2284
2285         <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">
2286                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2287                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2288                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2289                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2290                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2291                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2292                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2293                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2295                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2296                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2297                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2298                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2299                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2300                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2301                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2302                 </fields>
2303                 <links>
2304                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2305                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2306                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2307                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2308                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2309                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2310                 </links>
2311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2312                         <actions>
2313                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2314                                 <retrieve/>
2315                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2316                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2317                         </actions>
2318                 </permacrud>
2319         </class>
2320
2321         <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">
2322                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2323                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2324                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2325                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2326                 </fields>
2327                 <links>
2328                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2329                 </links>
2330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2331                         <actions>
2332                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2333                                 <retrieve/>
2334                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2335                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2336                         </actions>
2337                 </permacrud>
2338         </class>
2339
2340         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2341                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2343                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2344                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2345                 </fields>
2346                 <links>
2347                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2348                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2349                 </links>
2350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2351                         <actions>
2352                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2353                                 <retrieve/>
2354                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2355                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2356                         </actions>
2357                 </permacrud>
2358         </class>
2359
2360         <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">
2361                 <fields oils_persist:primary="code">
2362                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2363                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2364                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2365                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2366                 </fields>
2367                 <links>
2368                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2369                 </links>
2370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2371                         <actions>
2372                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2373                                 <retrieve/>
2374                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2375                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2376                         </actions>
2377                 </permacrud>
2378         </class>
2379
2380         <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">
2381                 <fields oils_persist:primary="code">
2382                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2383                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2384                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2385                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2386                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2387                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2388                 </fields>
2389                 <links>
2390                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2391                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2392                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2393                 </links>
2394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2395                         <actions>
2396                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2397                                 <retrieve/>
2398                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2399                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2400                         </actions>
2401                 </permacrud>
2402         </class>
2403
2404     <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">
2405         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2406             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2407             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2408             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2409         </fields>
2410         <links>
2411             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2412             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2413         </links>
2414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2415             <actions>
2416                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2417                 <retrieve/>
2418                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2419                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2420             </actions>
2421         </permacrud>
2422     </class>
2423
2424         <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">
2425                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2426                         <field name="active" reporter:datatype="bool"/>
2427                         <field name="create_date" reporter:datatype="timestamp"/>
2428                         <field name="creator" />
2429                         <field name="deleted" reporter:datatype="bool"/>
2430                         <field name="edit_date" reporter:datatype="timestamp"/>
2431                         <field name="editor" />
2432                         <field name="id" reporter:datatype="id" />
2433                         <field name="last_xact_id" />
2434                         <field name="marc" />
2435                         <field name="source" />
2436                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2437                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2438                         <field name="heading" />
2439                         <field name="simple_heading" />
2440                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2441                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2442                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2443                 </fields>
2444                 <links>
2445                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2446                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2447                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2448                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2449                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2450                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2451                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2452                 </links>
2453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2454                         <actions>
2455                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2456                                 <retrieve/>
2457                                 <update permission="UPDATE_MARC" global_required="true"/>
2458                                 <delete permission="UPDATE_MARC" global_required="true"/>
2459                         </actions>
2460                 </permacrud>
2461         </class>
2462         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2464                         <field name="char_encoding" />
2465                         <field name="id" />
2466                         <field name="record" />
2467                         <field name="record_status" />
2468                         <field name="thesaurus" />
2469                 </fields>
2470                 <links>
2471                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2472                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2473                 </links>
2474         </class>
2475         <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">
2476                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2477                         <field name="id" reporter:datatype="id" />
2478                         <field name="bib" reporter:datatype="link" />
2479                         <field name="authority" reporter:datatype="link" />
2480                 </fields>
2481                 <links>
2482                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2483                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2484                 </links>
2485         </class>
2486         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2487                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2488                         <field name="id" reporter:datatype="id" />
2489                         <field name="record" reporter:datatype="link" />
2490                         <field name="atag" reporter:datatype="link" />
2491                         <field name="value" reporter:datatype="text" />
2492                 </fields>
2493                 <links>
2494                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2495                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2496                 </links>
2497         </class>
2498         <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">
2499                 <fields oils_persist:primary="code" oils_persist:sequence="">
2500                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2501                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2502                 </fields>
2503                 <links/>
2504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505             <actions>
2506                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2507                 <retrieve/>
2508                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2509                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2510             </actions>
2511         </permacrud>
2512         </class>
2513         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2514                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2515                         <field name="accepting_usr" />
2516                         <field name="amount" reporter:datatype="money" />
2517                         <field name="amount_collected" reporter:datatype="money" />
2518                         <field name="approval_code" reporter:datatype="text"/>
2519                         <field name="cash_drawer" reporter:datatype="link"/>
2520                         <field name="cc_first_name" reporter:datatype="text"/>
2521                         <field name="cc_last_name" reporter:datatype="text"/>
2522                         <field name="cc_number" reporter:datatype="text"/>
2523                         <field name="cc_order_number" reporter:datatype="text"/>
2524                         <field name="cc_type" reporter:datatype="text"/>
2525                         <field name="cc_processor" reporter:datatype="text"/>
2526                         <field name="expire_month" reporter:datatype="int" />
2527                         <field name="expire_year" reporter:datatype="int" />
2528                         <field name="id" reporter:datatype="id" />
2529                         <field name="note" reporter:datatype="text"/>
2530                         <field name="payment_ts" reporter:datatype="timestamp"/>
2531                         <field name="xact" reporter:datatype="link"/>
2532                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2533                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2534                 </fields>
2535                 <links>
2536                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2537                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2538                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2539                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2540                 </links>
2541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2542             <actions>
2543                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2544                     <context link="xact" jump="usr" field="home_ou"/>
2545                 </retrieve>
2546                         </actions>
2547                 </permacrud>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="name">
2551                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2552                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2553                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2554                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2555                 </fields>
2556                 <links/>
2557         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2558             <actions>
2559                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2560                 <retrieve/>
2561                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2562                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2563             </actions>
2564         </permacrud>
2565         </class>
2566
2567         <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">
2568                 <fields oils_persist:primary="alias">
2569                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2570                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2571                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2572                 </fields>
2573                 <links>
2574                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2575                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2576                 </links>
2577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2578             <actions>
2579                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2580                 <retrieve/>
2581                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2582                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2583             </actions>
2584         </permacrud>
2585         </class>
2586
2587         <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">
2588                 <fields oils_persist:primary="name">
2589                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2590                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2591                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2592                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2593                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2594                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2595                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2596                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2597                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2598                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2599                 </fields>
2600                 <links>
2601                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2602                 </links>
2603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2604             <actions>
2605                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2606                 <retrieve/>
2607                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2608                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2609             </actions>
2610         </permacrud>
2611         </class>
2612
2613         <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">
2614                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2615                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2616                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2617                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2618                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2619                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2620                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2621                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2622                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2623                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2624                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2625                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2626                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2627                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2628                 </fields>
2629                 <links>
2630                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2631                 </links>
2632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2633             <actions>
2634                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2635                 <retrieve/>
2636                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2637                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2638             </actions>
2639         </permacrud>
2640         </class>
2641         <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">
2642                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2643                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2644                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2645                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2646                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2647                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2648                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2649                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2650                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2651                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2652                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2653                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2654                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2655                 </fields>
2656                 <links>
2657                 </links>
2658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659                         <actions>
2660                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2661                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2662                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2663                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2664                         </actions>
2665                 </permacrud>
2666         </class>
2667         <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">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2669                         <field name="id" reporter:datatype="id" />
2670                         <field name="name" reporter:datatype="text"/>
2671                         <field name="xpath" reporter:datatype="text"/>
2672                         <field name="format" reporter:datatype="link"/>
2673                         <field name="first_word" reporter:datatype="bool" />
2674                 </fields>
2675                 <links/>
2676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2677             <actions>
2678                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2679                 <retrieve/>
2680                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2681                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2682             </actions>
2683         </permacrud>
2684         </class>
2685         <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">
2686                 <fields oils_persist:primary="code" oils_persist:sequence="">
2687                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2688                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2689                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2690                 </fields>
2691                 <links/>
2692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2693             <actions>
2694                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2695                 <retrieve/>
2696                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2697                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2698             </actions>
2699         </permacrud>
2700         </class>
2701         <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">
2702                 <fields oils_persist:primary="code" oils_persist:sequence="">
2703                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2704                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2705                 </fields>
2706                 <links/>
2707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2708             <actions>
2709                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2710                 <retrieve/>
2711                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2712                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2713             </actions>
2714         </permacrud>
2715         </class>
2716     <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">
2717         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2718             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2719             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2720             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2721             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2722         </fields>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <retrieve/>
2726             </actions>
2727         </permacrud>
2728     </class>
2729         <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">
2730                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2731                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2732                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2733                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2734                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2735                 </fields>
2736                 <links>
2737                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2738                 </links>
2739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2740             <actions>
2741                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2742                 <retrieve/>
2743                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2744                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2745             </actions>
2746         </permacrud>
2747         </class>
2748         <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">
2749                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2750                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2751                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2752                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2753                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2754                 </fields>
2755                 <links>
2756                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2757                 </links>
2758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2759             <actions>
2760                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2761                 <retrieve/>
2762                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2763                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2764             </actions>
2765         </permacrud>
2766         </class>
2767         <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">
2768                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2769                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2770                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2771                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2772                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2773                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2774                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2775                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2776                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2777                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2778                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2779                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2782                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2783                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2784                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2785                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2786                 </fields>
2787                 <links>
2788                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2789                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2790                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2791                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2792                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2793                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2794                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2795                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2796                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2797                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2798                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2799                 </links>
2800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2801             <actions>
2802                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2803                 <retrieve/>
2804                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2805                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2806             </actions>
2807         </permacrud>
2808         </class>
2809         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2810                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2811                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2812                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2813                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2814                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2815                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2816                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2817                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2818                 </fields>
2819                 <links>
2820                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2821                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2822         </links>
2823         </class>
2824         <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">
2825                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2826                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2827                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2828                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2829                 </fields>
2830                 <links>
2831                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2832                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2833                 </links>
2834         </class>
2835         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2836                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2837                         <field name="id" reporter:datatype="id" />
2838                         <field name="value" oils_persist:i18n="true" />
2839                 </fields>
2840                 <links/>
2841         </class>
2842         <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">
2843                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2844                         <field name="balance_owed" reporter:datatype="money" />
2845                         <field name="total_owed" reporter:datatype="money" />
2846                         <field name="total_paid" reporter:datatype="money" />
2847                         <field name="usr" reporter:datatype="link"/>
2848                 </fields>
2849                 <links>
2850                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2851         </links>
2852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853             <actions>
2854                 <retrieve permission="VIEW_USER">
2855                     <context link="usr" field="home_ou"/>
2856                 </retrieve>
2857             </actions>
2858         </permacrud>
2859         </class>
2860         <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">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2862                         <field name="collector" />
2863                         <field name="enter_time" reporter:datatype="timestamp"/>
2864                         <field name="id" reporter:datatype="id" />
2865                         <field name="location" reporter:datatype="link"/>
2866                         <field name="usr" reporter:datatype="link"/>
2867                 </fields>
2868                 <links>
2869                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2870                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2871                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2872                 </links>
2873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="money.collections_tracker.create" context_field="location"/>
2876                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2877                 <delete permission="money.collections_tracker.create" context_field="location"/>
2878             </actions>
2879         </permacrud>
2880         </class>
2881         <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">
2882                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2883                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2884                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2885                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2886                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2887                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2888                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2889                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2890                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2891                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2892                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2893                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2894                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2895                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2896                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2897                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2898                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2899                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2900                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2901                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2903                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2904                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2905                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2906                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2907                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2908                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2910                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2911                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2912                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2913                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2914                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2915                 </fields>
2916                 <links>
2917                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2918                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2919                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2920                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2921                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2922                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2923                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2924                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2925                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2926                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2927                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2928                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2929                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2930                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2931                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2932                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2933                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2934                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2935                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2936                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2937                 </links>
2938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2939             <actions>
2940                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2941                 <retrieve/>
2942                 <update permission="UPDATE_MARC" global_required="true"/>
2943                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
2944                 <delete permission="DELETE_RECORD" global_required="true"/>
2945             </actions>
2946         </permacrud>
2947         </class>
2948         <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">
2949                 <fields oils_persist:primary="id">
2950                         <field name="dow_0_close" />
2951                         <field name="dow_0_open" />
2952                         <field name="dow_1_close" />
2953                         <field name="dow_1_open" />
2954                         <field name="dow_2_close" />
2955                         <field name="dow_2_open" />
2956                         <field name="dow_3_close" />
2957                         <field name="dow_3_open" />
2958                         <field name="dow_4_close" />
2959                         <field name="dow_4_open" />
2960                         <field name="dow_5_close" />
2961                         <field name="dow_5_open" />
2962                         <field name="dow_6_close" />
2963                         <field name="dow_6_open" />
2964                         <field name="id" reporter:datatype="id" />
2965                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2966                 </fields>
2967                 <links>
2968                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2969                 </links>
2970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2971             <actions>
2972                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2973                 <retrieve/>
2974                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2975                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2976             </actions>
2977         </permacrud>
2978         </class>
2979         <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">
2980                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2981                         <field name="id" reporter:datatype="id" />
2982                         <field name="record" reporter:datatype="link"/>
2983                         <field name="label" reporter:datatype="text"/>
2984                         <field name="label_sortkey" reporter:datatype="text"/>
2985                 </fields>
2986                 <links>
2987                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2988                 </links>
2989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2990             <actions>
2991                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2992                 <retrieve/>
2993                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2994                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2995             </actions>
2996         </permacrud>
2997         </class>
2998         <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">
2999                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3000                         <field name="id" reporter:datatype="id" />
3001                         <field name="target_copy" reporter:datatype="link" />
3002                         <field name="part" reporter:datatype="link"/>
3003                 </fields>
3004                 <links>
3005                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3006                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3007                 </links>
3008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3009             <actions>
3010                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3011                 <retrieve/>
3012                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3013                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3014             </actions>
3015         </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3019                         <field name="close_end" reporter:datatype="timestamp" />
3020                         <field name="close_start" reporter:datatype="timestamp" />
3021                         <field name="id" reporter:datatype="id" />
3022                         <field name="org_unit" reporter:datatype="org_unit"/>
3023                         <field name="reason" reporter:datatype="text"/>
3024                 </fields>
3025                 <links>
3026                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3027                 </links>
3028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029             <actions>
3030                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3031                 <retrieve/>
3032                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3033                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3034             </actions>
3035         </permacrud>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3039                         <field name="extended" reporter:datatype="interval"/>
3040                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3041                         <field name="max_renewals" reporter:datatype="int" />
3042                         <field name="name" reporter:datatype="text"/>
3043                         <field name="normal" reporter:datatype="interval"/>
3044                         <field name="shrt" reporter:datatype="interval"/>
3045                 </fields>
3046                 <links>
3047                 </links>
3048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3049             <actions>
3050                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3051                 <retrieve/>
3052                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3053                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3054             </actions>
3055         </permacrud>
3056         </class>
3057
3058         <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">
3059                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3060                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3061                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3062             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3063                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3064             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3065                 </fields>
3066                 <links>
3067             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3068                 </links>
3069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3070             <actions>
3071                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3072                 <retrieve/>
3073                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3074                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3075             </actions>
3076                 </permacrud>
3077         </class>
3078
3079         <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">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3081                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3082                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3083                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3084             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3085                 </fields>
3086                 <links>
3087                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3088                 </links>
3089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3090             <actions>
3091                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3092                 <retrieve/>
3093                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3094                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3095             </actions>
3096                 </permacrud>
3097         </class>
3098
3099         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3100                 <fields oils_persist:primary="id" oils_persist:sequence="">
3101                         <field name="balance_owed" reporter:datatype="money"/>
3102                         <field name="id" reporter:datatype="id" />
3103                         <field name="last_billing_note" reporter:datatype="text"/>
3104                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3105                         <field name="last_billing_type" reporter:datatype="text"/>
3106                         <field name="last_payment_note" reporter:datatype="text"/>
3107                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3108                         <field name="last_payment_type" reporter:datatype="text"/>
3109                         <field name="total_owed" reporter:datatype="money"/>
3110                         <field name="total_paid" reporter:datatype="money"/>
3111                         <field name="usr" reporter:datatype="link"/>
3112                         <field name="xact_finish" reporter:datatype="timestamp" />
3113                         <field name="xact_start" reporter:datatype="timestamp" />
3114                         <field name="xact_type" reporter:datatype="text"/>
3115                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3116                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3117                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field name="billing_location" reporter:datatype="link"/>
3120                 </fields>
3121                 <links>
3122                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3123                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3124                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3125                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3126                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3127                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3128                 </links>
3129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3130                         <actions>
3131                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3132                                         <context link="usr" field="home_ou" />
3133                                 </retrieve>
3134                         </actions>
3135                 </permacrud>
3136         </class>
3137         <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">
3138                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3139                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3140                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3141                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3142                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3143                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3144                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3146                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3148                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3149                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3150                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3151                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3152                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3153                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3154                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3155                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3156                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3157                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3158                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3159                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3160                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3161                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3162                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3163                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3164                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3165                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3166                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3167                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3168                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3169                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3170                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3171                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3172                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3173                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3174                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3175                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3176                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3177                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3178                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3179                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3180                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3181                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3182                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3183                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3184                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3185                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3186                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3187                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3188                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3189                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3190                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3192                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3202                 </fields>
3203                 <links>
3204                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3205                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3206                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3207                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3208                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3209                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3210                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3211                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3212                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3213                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3214                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3215                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3216                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3217                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3218                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3219                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3220                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3221                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3222                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3223                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3224                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3225                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3226                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3227                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3228                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3229                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3230                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3231                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3232                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3233                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3234                 </links>
3235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3236                         <actions>
3237                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3238                         </actions>
3239                 </permacrud>
3240         </class>
3241         <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">
3242                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3243                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3244                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3245                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3246                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3247                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3248                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3249                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3250                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3251         </fields>
3252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3253                         <actions>
3254                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3255                                 <retrieve/>
3256                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3257                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3258                         </actions>
3259                 </permacrud>
3260         </class>
3261         <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">
3262                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3263                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3264                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3265                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3266                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3267         </fields>
3268         <links>
3269                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3270                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3271                 </links>
3272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3273                         <actions>
3274                                 <retrieve permission="RUN_REPORTS">
3275                                         <context link="usr" field="home_ou" />
3276                                 </retrieve>
3277                         </actions>
3278                 </permacrud>
3279         </class>
3280         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3282                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3283                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3284                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3285                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3286                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3287                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3288         </fields>
3289         <links>
3290                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3291                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3292                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3293                 </links>
3294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3295                         <actions>
3296                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3297                                         <context link="usr" field="home_ou" />
3298                                         <context link="ws" field="owning_lib" />
3299                                 </retrieve>
3300                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3301                                         <context link="usr" field="home_ou" />
3302                                         <context link="ws" field="owning_lib" />
3303                                 </create>
3304                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3305                                         <context link="usr" field="home_ou" />
3306                                         <context link="ws" field="owning_lib" />
3307                                 </update>
3308                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3309                                         <context link="usr" field="home_ou" />
3310                                         <context link="ws" field="owning_lib" />
3311                                 </delete>
3312                         </actions>
3313                 </permacrud>
3314         </class>
3315         <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">
3316                 <fields oils_persist:primary="name">
3317                         <field name="name" reporter:datatype="text"/>
3318                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3319                 </fields>
3320                 <links/>
3321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3322                         <actions>
3323                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3324                                 <retrieve/>
3325                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3326                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3327                         </actions>
3328                 </permacrud>
3329         </class>
3330         <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">
3331                 <fields oils_persist:primary="name">
3332                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3333                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3334                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3335                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3336                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3337                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3338                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3339                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3340                 </fields>
3341                 <links>
3342                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3343                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3344                 </links>
3345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3346                         <actions>
3347                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3348                                 <retrieve/>
3349                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3350                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3351                         </actions>
3352                 </permacrud>
3353         </class>
3354         <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">
3355                 <fields oils_persist:primary="name">
3356                         <field name="name" reporter:datatype="text"/>
3357                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3358                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3359                         <field name="datatype" reporter:datatype="text"/>
3360                         <field name="view_perm" reporter:datatype="link"/>
3361                         <field name="update_perm" reporter:datatype="link"/>
3362                         <field name="fm_class" reporter:datatype="text"/>
3363                         <field name="grp" reporter:datatype="link"/>
3364                 </fields>
3365                 <links>
3366                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3367                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3368                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3369                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3370                 </links>
3371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372                         <actions>
3373                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3374                                 <retrieve/>
3375                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3376                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3377                         </actions>
3378                 </permacrud>
3379         </class>
3380         <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">
3381                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3382                         <field name="id" />
3383                         <field name="name"  reporter:datatype="text"/>
3384                         <field name="org_unit" reporter:datatype="org_unit"/>
3385                         <field name="value"  reporter:datatype="text"/>
3386                 </fields>
3387                 <links>
3388                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3389                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3390                 </links>
3391         </class>
3392         <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">
3393                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3394                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3395                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3396                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3397                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3398                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3399                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3400                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3401                 </fields>
3402                 <links>
3403                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3404                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3405                 </links>
3406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3407             <actions>
3408                 <create permission="CREATE_COPY_NOTE">
3409                     <context link="owning_copy" field="circ_lib"/>
3410                 </create>
3411                 <retrieve permission="VIEW_COPY_NOTES">
3412                     <context link="owning_copy" field="circ_lib"/>
3413                 </retrieve>
3414                 <update permission="UPDATE_COPY_NOTE">
3415                     <context link="owning_copy" field="circ_lib"/>
3416                 </update>
3417                 <delete permission="DELETE_COPY_NOTE">
3418                     <context link="owning_copy" field="circ_lib"/>
3419                 </delete>
3420             </actions>
3421         </permacrud>
3422         </class>
3423         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3424                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3425                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3426                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3427                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3428                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3429                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3430                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3431                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3432                 </fields>
3433                 <links>
3434                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3435                 </links>
3436         </class>
3437         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3439                         <field name="fingerprint"  reporter:datatype="text"/>
3440                         <field name="id" reporter:datatype="id" />
3441                         <field name="master_record" reporter:datatype="link"/>
3442                         <field name="mods"  reporter:datatype="text"/>
3443                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3444                 </fields>
3445                 <links>
3446                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3447                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3448                 </links>
3449         </class>
3450         <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">
3451                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3452                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3453                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3454                 </fields>
3455                 <links/>
3456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3457             <actions>
3458                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3459                 <retrieve/>
3460                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3461                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3462             </actions>
3463         </permacrud>
3464         </class>
3465         <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">
3466                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3467                         <field name="code"  reporter:datatype="text"/>
3468                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3469                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3470                 </fields>
3471                 <links/>
3472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3473             <actions>
3474                 <create permission="CREATE_PERM" global_required="true"/>
3475                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3476                 <update permission="UPDATE_PERM" global_required="true"/>
3477                 <delete permission="DELETE_PERM" global_required="true"/>
3478             </actions>
3479         </permacrud>
3480         </class>
3481         <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">
3482                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3483                         <field name="id" reporter:datatype="id" />
3484                         <field name="metarecord" reporter:datatype="link"/>
3485                         <field name="source" reporter:datatype="link"/>
3486                 </fields>
3487                 <links>
3488                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3489                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3490                 </links>
3491         </class>
3492         <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">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3494                         <field name="id" reporter:datatype="id" />
3495                         <field name="field" reporter:datatype="link"/>
3496                         <field name="source" reporter:datatype="link"/>
3497                         <field name="value"  reporter:datatype="text"/>
3498                 </fields>
3499                 <links>
3500                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3501                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3502                 </links>
3503         </class>
3504         <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">
3505                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3506                         <field name="id" reporter:datatype="id" />
3507                         <field name="value" reporter:datatype="text"/>
3508                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3509                 </fields>
3510                 <links>
3511                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3512                 </links>
3513         </class>
3514         <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">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3516                         <field name="id" reporter:datatype="id" />
3517                         <field name="entry" reporter:datatype="link"/>
3518                         <field name="def" reporter:datatype="link"/>
3519                         <field name="source" reporter:datatype="link"/>
3520                 </fields>
3521                 <links>
3522                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3523                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3524                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3525                 </links>
3526         </class>
3527         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3529                         <field name="id" reporter:datatype="id" />
3530                         <field name="entry" reporter:datatype="link"/>
3531                         <field name="simple_heading" reporter:datatype="link"/>
3532                 </fields>
3533                 <links>
3534                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3535                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3536                 </links>
3537         </class>
3538         <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">
3539                 <oils_persist:source_definition>
3540                         SELECT * FROM metabib.author_field_entry
3541                                                 UNION ALL
3542                         SELECT * FROM metabib.keyword_field_entry
3543                                                 UNION ALL
3544                         SELECT * FROM metabib.identifier_field_entry
3545                                                 UNION ALL
3546                         SELECT * FROM metabib.title_field_entry
3547                                                 UNION ALL
3548                         SELECT * FROM metabib.subject_field_entry
3549                                                 UNION ALL
3550                         SELECT * FROM metabib.series_field_entry
3551                 </oils_persist:source_definition>
3552                 <fields>
3553                         <field name="field" reporter:datatype="link"/>
3554                         <field name="id" reporter:datatype="id" />
3555                         <field name="source" reporter:datatype="link"/>
3556                         <field name="value"  reporter:datatype="text"/>
3557                 </fields>
3558                 <links>
3559                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3560                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3561                 </links>
3562         </class>
3563         <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">
3564                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3565                         <field name="field" reporter:datatype="link"/>
3566                         <field name="id" reporter:datatype="id" />
3567                         <field name="source" reporter:datatype="link"/>
3568                         <field name="value"  reporter:datatype="text"/>
3569                 </fields>
3570                 <links>
3571                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3572                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3573                 </links>
3574         </class>
3575         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3576                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3577                         <field name="accepting_usr" reporter:datatype="link"/>
3578                         <field name="amount" reporter:datatype="money" />
3579                         <field name="amount_collected" reporter:datatype="money" />
3580                         <field name="cash_drawer" reporter:datatype="link"/>
3581                         <field name="id" reporter:datatype="id" />
3582                         <field name="note"  reporter:datatype="text"/>
3583                         <field name="payment_ts" reporter:datatype="timestamp"/>
3584                         <field name="xact" reporter:datatype="link"/>
3585                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3586                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3587                 </fields>
3588                 <links>
3589                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3590                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3591                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3592                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3593                 </links>
3594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3595             <actions>
3596                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3597                     <context link="xact" jump="usr" field="home_ou"/>
3598                 </retrieve>
3599                         </actions>
3600                 </permacrud>
3601         </class>
3602         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3604                         <field name="accepting_usr" reporter:datatype="link"/>
3605                         <field name="amount" reporter:datatype="money" />
3606                         <field name="amount_collected" reporter:datatype="money" />
3607                         <field name="id" reporter:datatype="id" />
3608                         <field name="note"  reporter:datatype="text"/>
3609                         <field name="payment_ts" reporter:datatype="timestamp"/>
3610                         <field name="xact" reporter:datatype="link"/>
3611                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3612                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3613                 </fields>
3614                 <links>
3615                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3616                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3617                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3618                 </links>
3619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3620             <actions>
3621                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3622                     <context link="xact" jump="usr" field="home_ou"/>
3623                 </retrieve>
3624                         </actions>
3625                 </permacrud>
3626         </class>
3627         <class id="map" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3628                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3629                         <field name="accepting_usr" reporter:datatype="link"/>
3630                         <field name="amount" reporter:datatype="money" />
3631                         <field name="amount_collected" reporter:datatype="money" />
3632                         <field name="id" reporter:datatype="id" />
3633                         <field name="note"  reporter:datatype="text"/>
3634                         <field name="payment_ts" reporter:datatype="timestamp"/>
3635                         <field name="xact" reporter:datatype="link"/>
3636                         <field name="billing" reporter:datatype="link"/>
3637                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3638                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3639                 </fields>
3640                 <links>
3641                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3642                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3643                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3644                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3645                 </links>
3646         </class>
3647         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3649                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3650                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3651                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3652                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3653                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3654                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3655                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3656                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3657                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3658                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3659                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3660                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3661                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3662                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3663                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3664                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3665                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3666                 </fields>
3667                 <links>
3668                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3669                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3670                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3671                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3672                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3673                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3674                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3675                 </links>
3676         </class>
3677
3678         <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">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3680                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3681                         <field name="name"  reporter:datatype="text"/>
3682                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3683                         <field name="block_list" reporter:datatype="text"/>
3684                         <field name="staff_alert" reporter:datatype="bool"/>
3685                         <field name="org_depth" reporter:datatype="int"/>
3686                 </fields>
3687                 <links/>
3688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3689             <actions>
3690                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3691                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3692                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3693                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3694             </actions>
3695         </permacrud>
3696         </class>
3697         <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">
3698                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3699                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3700                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3701                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3702                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3703                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3704                 </fields>
3705                 <links>
3706                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3707                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3708                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3709         </links>
3710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3711             <actions>
3712                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3713                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3714                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3715                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3716             </actions>
3717         </permacrud>
3718         </class>
3719         <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">
3720                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3721                         <field name="holdable" reporter:datatype="bool"/>
3722                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3723                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3724                         <field name="opac_visible" reporter:datatype="bool"/>
3725             <field name="copy_active" reporter:datatype="bool"/>
3726             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3727                 </fields>
3728                 <links/>
3729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3730             <actions>
3731                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3732                 <retrieve/>
3733                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3734                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3735             </actions>
3736         </permacrud>
3737         </class>
3738         <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">
3739                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3740                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3741                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3742                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3743                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3744                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3745                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3746                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3747                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3748                 </fields>
3749                 <links>
3750                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3751                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3752                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3753                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3754                 </links>
3755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3756                         <actions>
3757                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3758                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3759                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3760                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3761                         </actions>
3762                 </permacrud>
3763         </class>
3764         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3765                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3766                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3767                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3768                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3769                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3770                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3771                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3772                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3773                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3774                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3775                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3776                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3777                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3778                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3779                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3780                 </fields>
3781                 <links>
3782                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3783                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3784                 </links>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3788                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3789                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3790                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3791                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3792                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3793                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3794                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3795                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3796                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3797                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3798                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3799                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3800                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3801                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3802                 </fields>
3803                 <links>
3804                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3805                 </links>
3806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3807                         <actions>
3808                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3809                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3810                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3811                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3812                         </actions>
3813                 </permacrud>
3814         </class>
3815
3816
3817         <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">
3818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3819                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3820                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3821                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3822                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3823                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3824                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3825                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3826                 </fields>
3827                 <links>
3828                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3829                 </links>
3830         </class>
3831
3832         <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">
3833                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3834                         <field name="call_number" />
3835                         <field name="create_date" reporter:datatype="timestamp"/>
3836                         <field name="creator" reporter:datatype="link"/>
3837                         <field name="id" reporter:datatype="id" />
3838                         <field name="pub" reporter:datatype="bool"/>
3839                         <field name="title"  reporter:datatype="text"/>
3840                         <field name="value"  reporter:datatype="text"/>
3841                 </fields>
3842                 <links>
3843                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3844                 </links>
3845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3846             <actions>
3847                 <create permission="CREATE_VOLUME_NOTE">
3848                     <context link="call_number" field="owning_lib"/>
3849                 </create>
3850                 <retrieve permission="VIEW_VOLUME_NOTES">
3851                     <context link="call_number" field="owning_lib"/>
3852                 </retrieve>
3853                 <update permission="UPDATE_VOLUME_NOTE">
3854                     <context link="call_number" field="owning_lib"/>
3855                 </update>
3856                 <delete permission="DELETE_VOLUME_NOTE">
3857                     <context link="call_number" field="owning_lib"/>
3858                 </delete>
3859             </actions>
3860         </permacrud>
3861         </class>
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3864                         <field name="create_date" reporter:datatype="timestamp"/>
3865                         <field name="creator" reporter:datatype="link"/>
3866                         <field name="edit_date" reporter:datatype="timestamp"/>
3867                         <field name="editor" reporter:datatype="link"/>
3868                         <field name="id" reporter:datatype="id" />
3869                         <field name="record" reporter:datatype="link"/>
3870                         <field name="value" reporter:datatype="text"/>
3871                 </fields>
3872                 <links>
3873                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3874                 </links>
3875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3876             <actions>
3877                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3878                 <retrieve/>
3879                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3880                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3881             </actions>
3882         </permacrud>
3883         </class>
3884         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3885         <oils_persist:source_definition>
3886 SELECT  usr,
3887         SUM(
3888             CASE
3889                 WHEN (
3890                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3891                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3892                 ) THEN 1
3893                 ELSE 0
3894             END
3895         ) AS out,
3896
3897         SUM(
3898             CASE
3899                 WHEN (
3900                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3901                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3902                 ) THEN 1
3903                 ELSE 0
3904             END
3905         ) AS overdue,
3906
3907         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3908         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3909         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3910   FROM  action.circulation
3911   WHERE checkin_time IS NULL
3912   GROUP BY 1
3913         </oils_persist:source_definition>
3914         <fields oils_persist:primary="usr">
3915             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3916             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3917             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3918             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3919             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3920             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3921         </fields>
3922         <links>
3923             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3924         </links>
3925         </class>
3926         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3927         <oils_persist:source_definition>
3928 SELECT  usr,
3929         STRING_AGG(
3930             CASE
3931                 WHEN (
3932                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3933                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3934                 ) THEN id::TEXT
3935                 ELSE '0'
3936             END
3937         ,',') AS out,
3938
3939         STRING_AGG(
3940             CASE
3941                 WHEN (
3942                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3943                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3944                 ) THEN id::TEXT
3945                 ELSE '0'
3946             END
3947         ,',') AS overdue,
3948
3949         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3950         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3951         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3952   FROM  action.circulation
3953   WHERE checkin_time IS NULL
3954   GROUP BY 1
3955         </oils_persist:source_definition>
3956         <fields oils_persist:primary="usr">
3957             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3958             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3959             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3960             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3961             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3962             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3963         </fields>
3964         <links>
3965             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3966         </links>
3967         </class>
3968         <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">
3969                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3970                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3971                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3972                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3973                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3974                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3975                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3976                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3977                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3978                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3979                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3980                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3981                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3982                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3983                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3984                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3985                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3986                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3987                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3988                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3989                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3990                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3991                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3992                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3993                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3994                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
3995                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3996                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3997                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3998                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3999                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4000                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4001                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4002                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4003                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4004                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4005                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4006                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4007                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4008                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4009                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4010                 </fields>
4011                 <links>
4012                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4013                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4014                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4015                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4016                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4017                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4018                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4019                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4020                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4021                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4022                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4023                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4024                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4025                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4026                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4027                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4028                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4029                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4030                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4031                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4032                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4033                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4034                 </links>
4035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4036                         <actions>
4037                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4038                         </actions>
4039                 </permacrud>
4040         </class>
4041         <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">
4042                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4043                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4044                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4045                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4046                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4047                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4048                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4049                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4050                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4051                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4052                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4053                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4054                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4055                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4056                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4057                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4058                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4059                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4060                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4061                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4062                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4063                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4064                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4065                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4066                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4067                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4068                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4069                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4070                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4071                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4073                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
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="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4077                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4078                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4079                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4080                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4081                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4082                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4083                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4084                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4086                 </fields>
4087                 <links>
4088                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4089                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4090                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4091                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4092                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4093                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4094                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4095                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4096                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4097                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4098                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4099                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4100                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4101                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4102                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4103                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4104                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4105                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4106                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4107                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4108                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4109                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4110                 </links>
4111         </class>
4112         <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">
4113                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4114                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4115                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4116                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4117                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4118                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4119                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4120                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4121                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4122                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4123                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4124                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4125                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4126                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4127                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4128                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4129                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4130                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4131                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4132                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4133                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4134                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4135                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4136                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4137                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4138                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4139                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4140                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4141                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4142                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4143                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4144                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4145                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4147                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4148                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4149                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4150                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4151                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4152                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4153                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4154                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4155                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4156                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4157                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4158                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4159                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4160                 </fields>
4161                 <links>
4162                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4163                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4164                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4165                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4166                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4167                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4168                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4169                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4170                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4171                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4172                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4173                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4174                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4175                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4176                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4177                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4178                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4179                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4180                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4181                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4182                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4183                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4184                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4185                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4186                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4187                 </links>
4188         </class>
4189
4190         <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">
4191                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4192                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4193                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4194                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4195                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4196                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4197                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4198                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4199                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4200                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4201                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4202                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4203                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4204                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4205                 </fields>
4206                 <links>
4207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4208                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4209                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4210                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4211                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4212                 </links>
4213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4214                         <actions>
4215                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4216                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4217                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4218                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4219                         </actions>
4220                 </permacrud>
4221         </class>
4222
4223         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4224                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4225                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4226                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4227                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4228                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4229                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4230                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4231                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4232                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4233                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4234                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4235                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4236                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4237                 </fields>
4238                 <links>
4239                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4240                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4241                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4242                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4243                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4244                 </links>
4245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4246                         <actions>
4247                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4248                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4249                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4250                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4251                         </actions>
4252                 </permacrud>
4253         </class>
4254         
4255         <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">
4256                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4257                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4258                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4259                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4260                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4261                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4262                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4263                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4264                 </fields>
4265                 <links>
4266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4267                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4268                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4269                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4270                 </links>
4271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4272                         <actions>
4273                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4274                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4275                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4276                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4277                         </actions>
4278                 </permacrud>
4279         </class>
4280         
4281         <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">
4282                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4283                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4284                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4285                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4286                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4287                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4288                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4289                 </fields>
4290                 <links>
4291                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4292                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4293                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4294                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4295                 </links>
4296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4297                         <actions>
4298                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4299                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4300                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4301                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4302                         </actions>
4303                 </permacrud>
4304         </class>
4305         
4306         <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">
4307                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4308                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4309                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4310                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4311                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4312                 </fields>
4313                 <links>
4314                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4315                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4316                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4317                 </links>
4318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4319                         <actions>
4320                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4321                     <context link="resource" field="owner" />
4322                 </create>
4323                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4324                     <context link="resource" field="owner" />
4325                 </retrieve>
4326                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4327                     <context link="resource" field="owner" />
4328                 </update>
4329                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4330                     <context link="resource" field="owner" />
4331                 </delete>
4332                         </actions>
4333                 </permacrud>
4334         </class>
4335         
4336         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4338                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4339                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4340                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4342                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4343                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4344                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4345                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4346                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4347                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4348                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4349                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4350                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4351                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4352                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4353                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4354                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4355                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4356                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4357                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4358                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4359                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4360                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4361                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4362                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4363                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4364                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4365                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4366                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4367                 </fields>
4368                 <links>
4369                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4370                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4371                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4372                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4373                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4374                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4375                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4376                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4377                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4378                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4379                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4380                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4381                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4382                 </links>
4383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4384                         <actions>
4385                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4386                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4387                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4388                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4389                         </actions>
4390                 </permacrud>
4391         </class>
4392         
4393         <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">
4394                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4395                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4396                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4397                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4398                 </fields>
4399                 <links>
4400                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4401                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4402                 </links>
4403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4404                         <actions>
4405                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4406                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4407                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4408                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4409                         </actions>
4410                 </permacrud>
4411         </class>
4412
4413         <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">
4414                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4415                         <field name="bucket" reporter:datatype="link"/>
4416                         <field name="id" reporter:datatype="id" />
4417                         <field name="target_call_number" reporter:datatype="link" />
4418                         <field name="create_time" reporter:datatype="timestamp" />
4419                         <field name="pos" reporter:datatype="int" />
4420                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4421                 </fields>
4422                 <links>
4423                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4424                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4425             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4426                 </links>
4427         </class>
4428         <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">
4429                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4430                         <field name="id" reporter:datatype="id" />
4431                         <field name="item" reporter:datatype="link"/>
4432                         <field name="note" reporter:datatype="text" />
4433                 </fields>
4434                 <links>
4435                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4436                 </links>
4437         </class>
4438         <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">
4439                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4440                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4441                         <field name="btype" reporter:datatype="text"/>
4442                         <field name="id" reporter:datatype="id" />
4443                         <field name="name" reporter:datatype="text"/>
4444                         <field name="description" reporter:datatype="text"/>
4445                         <field name="owner" reporter:datatype="link"/>
4446                         <field name="pub" reporter:datatype="bool"/>
4447                         <field name="create_time" reporter:datatype="timestamp" />
4448                 </fields>
4449                 <links>
4450                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4451                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4452                 </links>
4453         </class>
4454         <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">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4456                         <field name="id" reporter:datatype="id" />
4457                         <field name="bucket" reporter:datatype="link"/>
4458                         <field name="note" reporter:datatype="text" />
4459                 </fields>
4460                 <links>
4461                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4462                 </links>
4463         </class>
4464         <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">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4466                         <field name="hold" reporter:datatype="link"/>
4467                         <field name="id" reporter:datatype="id" />
4468                         <field name="target_copy" reporter:datatype="link"/>
4469                         <field name="proximity" reporter:datatype="number"/>
4470                 </fields>
4471                 <links>
4472                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4473                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4474                 </links>
4475         </class>
4476         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4477                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4478                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4479                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4480                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4481                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4482                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4483                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4484                 </fields>
4485                 <links>
4486                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4487                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4488                 </links>
4489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490             <actions>
4491                 <create permission="CREATE_HOLD_NOTIFICATION">
4492                                         <context link="hold" jump="usr" field="home_ou" />
4493                                 </create>
4494                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4495                                         <context link="hold" jump="usr" field="home_ou" />
4496                                 </retrieve>
4497                 <update permission="CREATE_HOLD_NOTIFICATION">
4498                                         <context link="hold" jump="usr" field="home_ou" />
4499                                 </update>
4500                 <delete permission="CREATE_HOLD_NOTIFICATION">
4501                                         <context link="hold" jump="usr" field="home_ou" />
4502                                 </delete>
4503             </actions>
4504         </permacrud>
4505         </class>
4506         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4507                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4508                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4509                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4510                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4511                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4512                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4513                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4514                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4515                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4516                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4517                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4518                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4519                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4520                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4521                 </fields>
4522                 <links>
4523                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4524                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4525                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4526                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4527                 </links>
4528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4529             <actions>
4530                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4531                 <retrieve/>
4532                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4533                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4534             </actions>
4535         </permacrud>
4536         </class>
4537         <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">
4538                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4539                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4540                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4541                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4542                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4543             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4544             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4545             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4546                 </fields>
4547                 <links>
4548                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4549                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4550                 </links>
4551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4552             <actions>
4553                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4554                 <retrieve/>
4555                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4556                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4557             </actions>
4558         </permacrud>
4559         </class>
4560         <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">
4561                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4562                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4563             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4564             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4565                 </fields>
4566                 <links>
4567                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4568                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4569                 </links>
4570         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4571             <actions>
4572                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4573                                         <context link="lgroup" field="owner" />
4574                 </create>
4575                 <retrieve/>
4576                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4577                                         <context link="lgroup" field="owner" />
4578                 </update>
4579                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4580                                         <context link="lgroup" field="owner" />
4581                 </delete>
4582             </actions>
4583         </permacrud>
4584         </class>
4585
4586     <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">
4587         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4588             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4589             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4590             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4591             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4592         </fields>
4593         <links>
4594             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4595             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4596         </links>
4597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4598             <actions>
4599                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4600                 <retrieve/>
4601                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4602                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4603             </actions>
4604         </permacrud>
4605     </class>
4606
4607         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4608                 <fields>
4609                         <field name="sre_id" oils_persist:virtual="true" />
4610                         <field name="location" oils_persist:virtual="true" />
4611                         <field name="owning_lib" oils_persist:virtual="true" />
4612                         <field name="basic_holdings" oils_persist:virtual="true" />
4613                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4614                         <field name="supplement_holdings" oils_persist:virtual="true" />
4615                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4616                         <field name="index_holdings" oils_persist:virtual="true" />
4617                         <field name="index_holdings_add" oils_persist:virtual="true" />
4618                         <field name="online" oils_persist:virtual="true" />
4619                         <field name="missing" oils_persist:virtual="true" />
4620                         <field name="incomplete" oils_persist:virtual="true" />
4621                 </fields>
4622         </class>
4623
4624         <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">
4625                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4626                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4627                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4628                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4629                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4630                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4631                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4632                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4633                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4634                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4635                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4636                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4637                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4638                 </fields>
4639                 <links>
4640                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4641                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4642                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4643                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4644                 </links>
4645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4646                         <actions>
4647                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4648                                 <retrieve/>
4649                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4650                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4651                         </actions>
4652                 </permacrud>
4653         </class>
4654
4655         <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">
4656                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4657                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4658                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4659                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4660                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4661                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4662                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4663                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4664                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4665                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4666                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4667                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4668                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4669                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4670                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4671                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4672                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4673                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4674                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4675                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4676                 </fields>
4677                 <links>
4678                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4679                 </links>
4680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4681                         <actions>
4682                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4683                                         <context link="subscription" field="owning_lib" />
4684                                 </create>
4685                                 <retrieve />
4686                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4687                                         <context link="subscription" field="owning_lib" />
4688                                 </update>
4689                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4690                                         <context link="subscription" field="owning_lib" />
4691                                 </delete>
4692                         </actions>
4693                 </permacrud>
4694         </class>
4695
4696         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4698                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4699                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4700                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4701                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4702                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4703                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4704                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4705                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4706                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4707                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4708                 </fields>
4709                 <links>
4710                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4711                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4712                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4713                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4714                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4715                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4716                 </links>
4717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4718                         <actions>
4719                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4720                                 <retrieve />
4721                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4722                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4723                         </actions>
4724                 </permacrud>
4725         </class>
4726
4727         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4728                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4729                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4730                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4731                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4732                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4733                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4734                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4735                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4736                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4737                 </fields>
4738                 <links>
4739                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4740                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4741                 </links>
4742         </class>
4743
4744         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4745                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4746                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4747                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4748                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4749                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4750                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4751                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4752                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4753                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4754                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4755                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4756                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4757                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4758                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4759                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4760                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4762                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4763                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4764                 </fields>
4765                 <links>
4766                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4767                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4768                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4769                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4770                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4771                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4772                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4773                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4774                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4775                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4776                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4777                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4778                 </links>
4779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4780                         <actions>
4781                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4782                                 <retrieve />
4783                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4784                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4785                         </actions>
4786                 </permacrud>
4787         </class>
4788
4789         <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">
4790                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4791                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4792                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4793                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4794                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4795                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4796                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4797                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4798                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4799                 </fields>
4800                 <links>
4801                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4802                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4803                 </links>
4804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4805                         <actions>
4806                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4807                                         <context link="distribution" field="holding_lib" />
4808                                 </create>
4809                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4810                                         <context link="distribution" field="holding_lib" />
4811                                 </retrieve>
4812                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4813                                         <context link="distribution" field="holding_lib" />
4814                                 </update>
4815                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4816                                         <context link="distribution" field="holding_lib" />
4817                                 </delete>
4818                         </actions>
4819                 </permacrud>
4820         </class>
4821
4822         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4823                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4824                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4825                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4826                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4827                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4828                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4829                 </fields>
4830                 <links>
4831                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4832                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4833                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4834                 </links>
4835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4836                         <actions>
4837                                 <create permission="ADMIN_SERIAL_STREAM">
4838                                         <context link="distribution" field="holding_lib" />
4839                                 </create>
4840                                 <retrieve />
4841                                 <update permission="ADMIN_SERIAL_STREAM">
4842                                         <context link="distribution" field="holding_lib" />
4843                                 </update>
4844                                 <delete permission="ADMIN_SERIAL_STREAM">
4845                                         <context link="distribution" field="holding_lib" />
4846                                 </delete>
4847                         </actions>
4848                 </permacrud>
4849         </class>
4850
4851         <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">
4852                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4853                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4854                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4855                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4856                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4857                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4858                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4859                 </fields>
4860                 <links>
4861                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4862                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4863                 </links>
4864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4865                         <actions>
4866                                 <create permission="ADMIN_SERIAL_STREAM">
4867                                         <context link="stream" jump="distribution" field="holding_lib" />
4868                                 </create>
4869                                 <retrieve permission="RECEIVE_SERIAL">
4870                                         <context link="stream" jump="distribution" field="holding_lib" />
4871                                 </retrieve>
4872                                 <update permission="ADMIN_SERIAL_STREAM">
4873                                         <context link="stream" jump="distribution" field="holding_lib" />
4874                                 </update>
4875                                 <delete permission="ADMIN_SERIAL_STREAM">
4876                                         <context link="stream" jump="distribution" field="holding_lib" />
4877                                 </delete>
4878                         </actions>
4879                 </permacrud>
4880         </class>
4881
4882         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4883                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4884                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4885                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4886                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4887                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4888                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4889                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4890                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4891                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4892                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4893                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4894                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4895                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4896                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4897                 </fields>
4898                 <links>
4899                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4900                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4901                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4902                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4903                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4904                 </links>
4905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4906                         <actions>
4907                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4908                                         <context link="subscription" field="owning_lib" />
4909                                 </create>
4910                                 <retrieve/>
4911                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4912                                         <context link="subscription" field="owning_lib" />
4913                                 </update>
4914                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4915                                         <context link="subscription" field="owning_lib" />
4916                                 </delete>
4917                         </actions>
4918                 </permacrud>
4919         </class>
4920
4921         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4922                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4923                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4924                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4925                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4926                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4927                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4928                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4929                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4930                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4931                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4932                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4933                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4934                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4935                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4936                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4937                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4938                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4939                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4940                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4941                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4942                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4943                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4944                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4945                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4946                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4947                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4948                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4949                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4950                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4951                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4952                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4953                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4954                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4955                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4956                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4957                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4958                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4959                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4960                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4961                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4962                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4963                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4964                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4965                 </fields>
4966                 <links>
4967                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4968                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4969                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4970                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4971                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4972                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4973                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4974                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4975                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4976                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4977                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4978                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4979                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4980                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4981                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4982                 </links>
4983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4984                         <actions>
4985                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4986                                 <retrieve/>
4987                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4988                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4989                         </actions>
4990                 </permacrud>
4991         </class>
4992
4993         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4995                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4996                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4997                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4998                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4999                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5000                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5001                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5002                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5003                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5004                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5005                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5006                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5007                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5008                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5009                 </fields>
5010                 <links>
5011                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5012                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5013                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5014                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5015                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5016                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5017                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5018                 </links>
5019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5020                         <actions>
5021                                 <create permission="ADMIN_SERIAL_ITEM">
5022                                         <context link="stream" jump="distribution" field="holding_lib" />
5023                                 </create>
5024                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5025                                         <context link="stream" jump="distribution" field="holding_lib" />
5026                                 </retrieve>
5027                                 <update permission="ADMIN_SERIAL_ITEM">
5028                                         <context link="stream" jump="distribution" field="holding_lib" />
5029                                 </update>
5030                                 <delete permission="ADMIN_SERIAL_ITEM">
5031                                         <context link="stream" jump="distribution" field="holding_lib" />
5032                                 </delete>
5033                         </actions>
5034                 </permacrud>
5035         </class>
5036
5037         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5038                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5039                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5040                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5041                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5042                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5043                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5044                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5045                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5046                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5047                 </fields>
5048                 <links>
5049                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5050                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5051                 </links>
5052                 <!-- Not available via PCRUD at this time -->
5053         </class>
5054         <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">
5055                 <fields>
5056                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5057                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5058                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5059                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5060                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5061                 </fields>
5062                 <links>
5063                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5064                 </links>
5065         </class>
5066         <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">
5067                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5068                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5069                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5070                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5071                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5072                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5073                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5074                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5075                 </fields>
5076                 <links>
5077                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5078                 </links>
5079         </class>
5080         <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">
5081                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5082                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5083                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5084                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5085                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5086                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5087                 </fields>
5088                 <links>
5089                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5090                 </links>
5091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5092                         <actions>
5093                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5094                                         <context link="distribution" field="holding_lib" />
5095                                 </create>
5096                                 <retrieve/>
5097                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5098                                         <context link="distribution" field="holding_lib" />
5099                                 </update>
5100                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5101                                         <context link="distribution" field="holding_lib" />
5102                                 </delete>
5103                         </actions>
5104                 </permacrud>
5105         </class>
5106
5107         <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">
5108                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5109                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5110                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5111                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5112                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5113                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5114                 </fields>
5115                 <links>
5116                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5117                 </links>
5118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5119                         <actions>
5120                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5121                                         <context link="distribution" field="holding_lib" />
5122                                 </create>
5123                                 <retrieve/>
5124                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5125                                         <context link="distribution" field="holding_lib" />
5126                                 </update>
5127                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5128                                         <context link="distribution" field="holding_lib" />
5129                                 </delete>
5130                         </actions>
5131                 </permacrud>
5132         </class>
5133
5134         <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">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5136                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5137                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5138                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5139                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5140                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5141                 </fields>
5142                 <links>
5143                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5144                 </links>
5145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5146                         <actions>
5147                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5148                                         <context link="distribution" field="holding_lib" />
5149                                 </create>
5150                                 <retrieve/>
5151                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5152                                         <context link="distribution" field="holding_lib" />
5153                                 </update>
5154                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5155                                         <context link="distribution" field="holding_lib" />
5156                                 </delete>
5157                         </actions>
5158                 </permacrud>
5159         </class>
5160
5161         <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">
5162                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5163                         <field name="id" reporter:datatype="id" />
5164                         <field name="owning_copy" reporter:datatype="link"/>
5165                         <field name="stat_cat" reporter:datatype="link"/>
5166                         <field name="stat_cat_entry" reporter:datatype="link"/>
5167                 </fields>
5168                 <links>
5169                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5170                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5171                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5172                 </links>
5173         </class>
5174         <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">
5175                 <fields oils_persist:primary="code">
5176                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5177                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5178                 </fields>
5179                 <links/>
5180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5181             <actions>
5182                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5183                 <retrieve/>
5184                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5185                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5186             </actions>
5187         </permacrud>
5188         </class>
5189         <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">
5190                 <fields oils_persist:primary="code">
5191                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5192                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5193                 </fields>
5194                 <links/>
5195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5196             <actions>
5197                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5198                 <retrieve/>
5199                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5200                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5201             </actions>
5202         </permacrud>
5203         </class>
5204         <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">
5205                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5206                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5207                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5208                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5209                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5210                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5211                 </fields>
5212                 <links>
5213             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5214         </links>
5215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5216             <actions>
5217                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5218                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5219                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5220                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5221             </actions>
5222         </permacrud>
5223         </class>
5224         <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">
5225                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5226                         <field name="id" reporter:datatype="id" />
5227                         <field name="name" reporter:datatype="text"/>
5228                 </fields>
5229                 <links/>
5230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5231             <actions>
5232                 <create permission="CREATE_LASSO" global_required="true"/>
5233                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5234                 <update permission="UPDATE_LASSO" global_required="true"/>
5235                 <delete permission="DELETE_LASSO" global_required="true"/>
5236             </actions>
5237         </permacrud>
5238         </class>
5239         <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">
5240                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5241                         <field name="id" reporter:datatype="id" />
5242                         <field name="lasso" reporter:datatype="link"/>
5243                         <field name="org_unit" reporter:datatype="org_unit"/>
5244                 </fields>
5245                 <links>
5246                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5247                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5248                 </links>
5249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5250             <actions>
5251                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5252                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5253                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5254                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5255             </actions>
5256         </permacrud>
5257         </class>
5258         <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">
5259                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5260                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5261                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5262                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5263                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5264                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5265                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5266                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5267                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5268                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5269                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5270                 </fields>
5271                 <links>
5272                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5273                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5275                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5276                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5277                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5278                 </links>
5279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5280             <actions>
5281                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5282                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5283                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5284                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5285             </actions>
5286         </permacrud>
5287         </class>
5288         <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">
5289                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5290                         <field name="id" reporter:datatype="id" />
5291                         <field name="from_org" reporter:datatype="org_unit"/>
5292                         <field name="to_org" reporter:datatype="org_unit"/>
5293                         <field name="prox" reporter:datatype="int" />
5294                 </fields>
5295                 <links>
5296                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5297                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5298                 </links>
5299         </class>
5300         <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">
5301                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5302                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5303                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5304                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5305                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5306                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5307                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5308                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5309                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5310                 </fields>
5311                 <links/>
5312         </class>
5313         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5314                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5315                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5318                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5320                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5321                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5322                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5323                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5324                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5325                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5327                 </fields>
5328                 <links>
5329                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5330                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5331                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5332                 </links>
5333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5334             <actions>
5335                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5336                 <retrieve/>
5337                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5338                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5339             </actions>
5340         </permacrud>
5341         </class>
5342         <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">
5343                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5344                         <field name="address_type"  reporter:datatype="text"/>
5345                         <field name="city"  reporter:datatype="text"/>
5346                         <field name="country"  reporter:datatype="text"/>
5347                         <field name="county"  reporter:datatype="text"/>
5348                         <field name="id" reporter:datatype="id" />
5349                         <field name="org_unit" reporter:datatype="org_unit"/>
5350                         <field name="post_code"  reporter:datatype="text"/>
5351                         <field name="state"  reporter:datatype="text"/>
5352                         <field name="street1"  reporter:datatype="text"/>
5353                         <field name="street2"  reporter:datatype="text"/>
5354                         <field name="valid" reporter:datatype="bool"/>
5355                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5356                 </fields>
5357                 <links>
5358                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5359                 </links>
5360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5361             <actions>
5362                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5363                 <retrieve/>
5364                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5365                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5366             </actions>
5367         </permacrud>
5368         </class>
5369         <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">
5370                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5371                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5372                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5373                         <field name="query_text" reporter:datatype="text"/>
5374                 </fields>
5375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5376             <actions>
5377                 <retrieve/>
5378             </actions>
5379         </permacrud>
5380         </class>
5381
5382         <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">
5383                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5384                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5385                         <field name="owner" reporter:datatype="org_unit"/>
5386                         <field name="code" reporter:datatype="text"/>
5387                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5388                         <field name="create_date" reporter:datatype="timestamp"/>
5389                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5390                 </fields>
5391                 <links>
5392                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5393                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5394                 </links>
5395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5396             <actions>
5397                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5398                 <retrieve/>
5399                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5400                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5401             </actions>
5402         </permacrud>
5403         </class>
5404         <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">
5405                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5406                         <field name="id" reporter:datatype="id"/>
5407                         <field name="grp" reporter:datatype="link"/>
5408                         <field name="pos" reporter:datatype="int"/>
5409                         <field name="query" reporter:datatype="link"/>
5410                 </fields>
5411                 <links>
5412                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5413                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5414                 </links>
5415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416             <actions>
5417                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5418                     <context link="grp" field="owner"/>
5419                 </create>
5420                 <retrieve/>
5421                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5422                     <context link="grp" field="owner"/>
5423                 </update>
5424                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5425                     <context link="grp" field="owner"/>
5426                 </delete>
5427             </actions>
5428         </permacrud>
5429         </class>
5430
5431         <!-- A note: Please update alhr and ahopl when updating ahr -->
5432         <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">
5433                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5434                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5435                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5436                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5437                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5438                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5439                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5440                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5441                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5442                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5443                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5444                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5445                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5446                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5447                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5448                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5449                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5450                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5451                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5452                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5454                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5455                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5456                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5457                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5458                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5459                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5460                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5461                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5462                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5463                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5464                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5465                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5467                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5468                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5469                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5470                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5471                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5472                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5473                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5474                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5475                 </fields>
5476                 <links>
5477                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5478                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5479                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5480                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5481                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5482                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5483                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5484                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5485                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5486                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5487                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5488                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5489                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5490                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5491                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5492                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5493                 </links>
5494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5495                         <actions>
5496                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5497                         </actions>
5498                 </permacrud>
5499         </class>
5500         <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">
5501                 <oils_persist:source_definition><![CDATA[
5502                 SELECT
5503                         ahr.*,
5504                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5505                                 copy_location_order_position,
5506                         CASE WHEN au.alias IS NOT NULL THEN
5507                                 au.alias
5508                         ELSE
5509                                 au.first_given_name
5510                         END AS usr_alias_or_first_given_name,
5511                         au.first_given_name AS usr_first_given_name,
5512                         au.second_given_name AS usr_second_given_name,
5513                         au.family_name AS usr_family_name,
5514                         au.prefix AS usr_prefix,
5515                         au.suffix AS usr_suffix,
5516                         au.alias AS usr_alias,
5517                         CASE WHEN au.alias IS NOT NULL THEN
5518                                 au.alias
5519                         ELSE
5520                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5521                                         COALESCE(au.family_name, ''),
5522                                         COALESCE(au.suffix, ''),
5523                                         ', ',
5524                                         COALESCE(au.prefix, ''),
5525                                         COALESCE(au.first_given_name, ''),
5526                                         COALESCE(au.second_given_name, '')
5527                                 ], ' '), E'\\s+,', ',')
5528                         END AS usr_alias_or_display_name,
5529                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5530                                 COALESCE(au.family_name, ''),
5531                                 COALESCE(au.suffix, ''),
5532                                 ', ',
5533                                 COALESCE(au.prefix, ''),
5534                                 COALESCE(au.first_given_name, ''),
5535                                 COALESCE(au.second_given_name, '')
5536                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5537                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5538                                 AS call_number_label,
5539                         siss.label AS issuance_label,
5540                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5541                         ahcm_1.copy_count AS potential_copies
5542                 FROM action.hold_request ahr
5543                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5544                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5545                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5546                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5547                 JOIN actor.usr au ON (au.id = ahr.usr)
5548                 JOIN (
5549                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5550                         FROM asset.copy_location
5551                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5552                 LEFT JOIN actor.usr_standing_penalty ausp 
5553                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5554                 LEFT JOIN config.standing_penalty csp
5555                         ON (
5556                                 csp.id = ausp.standing_penalty AND 
5557                                 csp.block_list LIKE '%CAPTURE%' AND (
5558                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5559                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5560                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5561                                         )
5562                                 )
5563                         )
5564                 JOIN (
5565                         SELECT COUNT(target_copy) AS copy_count, hold
5566                         FROM action.hold_copy_map
5567                         GROUP BY 2
5568                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5569                 LEFT JOIN serial.issuance siss
5570                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5571                 LEFT JOIN asset.copy_location_order acplo
5572                         ON (acp.location = acplo.location AND
5573                                 acp.circ_lib = acplo.org)
5574                 WHERE
5575                         ahr.capture_time IS NULL AND
5576                         ahr.cancel_time IS NULL AND
5577                         csp.id IS NULL AND
5578                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5579                         acp.status IN (0,7)
5580                 ]]></oils_persist:source_definition>
5581                 <fields oils_persist:primary="id">
5582                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5583                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5584                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5585                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5586                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5587                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5588                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5589                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5590                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5591                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5592                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5593                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5594                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5595                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5596                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5597                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5598                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5599                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5600                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5601                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5602                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5603                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5604                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5605                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5606                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5607                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5608                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5609                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5610                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5611                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5612                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5613                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5614                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5615                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5616                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5617                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5618                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5619                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5620                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5621                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5622                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5623                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5624                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5625                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5626                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5627                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5628                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5629                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5630                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5631                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5632                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5633                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5634                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5635                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5636                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5637                 </fields>
5638                 <links>
5639                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5640                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5641                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5642                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5643                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5644                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5645                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5646                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5647                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5648                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5649                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5650                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5651                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5652                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5653                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5654                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5655                 </links>
5656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5657                         <actions>
5658                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5659                         </actions>
5660                 </permacrud>
5661         </class>
5662         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5663                 <oils_persist:source_definition>
5664                         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)
5665                 </oils_persist:source_definition>
5666                 <fields oils_persist:primary="id">
5667                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5668                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5669                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5670                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5671                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5672                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5673                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5674                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5675                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5676                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5677                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5678                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5679                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5680                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5681                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5683                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5684                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5685                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5686                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5687                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5688                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5689                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5690                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5692                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5693                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5694                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5695                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5696                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5697                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5698                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5699                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5700                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5701                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5702                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5704                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5705                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5706                 </fields>
5707                 <links>
5708                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5709                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5710                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5711                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5712                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5713                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5714                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5715                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5716                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5717                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5718                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5719                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5720                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5721                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5722                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5723                 </links>
5724         </class>
5725
5726         <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">
5727                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5728                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5729                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5730                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5731                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5732                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5733                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5734                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5735                 </fields>
5736                 <links>
5737                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5738                 </links>
5739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5740                         <actions>
5741                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5742                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5743                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5744                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5745                         </actions>
5746                 </permacrud>
5747         </class>
5748         <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">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5750                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5751                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5752                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5753                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5754                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5755                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5756                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5757                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5758                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5759                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5760                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5761                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5762                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5763                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5764                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5766                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5768                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5769                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5770                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5771                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5772                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5773                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5774                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5775                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5776                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5777                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5778                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5780                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5781                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5782                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5783                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5784                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5785                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5786                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5787                 </fields>
5788                 <links>
5789                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5791                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5792                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5793                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5794                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5795                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5796                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5797                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5798                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5799                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5800                 </links>
5801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5802                         <actions>
5803                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5804                         </actions>
5805                 </permacrud>
5806         </class>
5807         <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">
5808                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5809                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5810                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5811                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5812                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5813                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5814                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5815                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5816                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5817                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5818                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5819                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5820                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5821                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5822                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5823                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5824                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5825                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5826                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5827                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5828                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5829                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5830                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5831                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5832                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5833                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5834                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5835                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5836                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5837                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5838                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5839                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5840                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5841                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5842                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5843                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5844                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5845                 </fields>
5846                 <links>
5847                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5848                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5849                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5850                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5851                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5852                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5853                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5854                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5855                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5856                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5857                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5858                 </links>
5859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5860                         <actions>
5861                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5862                         </actions>
5863                 </permacrud>
5864         </class>
5865
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5868                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5869                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5870                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5871                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5872                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5873                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5874                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5875                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5876                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5877                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5878                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5879                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5880                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5881                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5882                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5883                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5884                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5885                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5886                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5887                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5889                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5893                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5894                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5895                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5896                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5897                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5898                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5899                 </fields>
5900                 <links>
5901                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5902                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5903                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5904                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5905                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5906                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5907                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5908                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5909                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5910                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5911                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5912                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5913                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5914                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5915                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5916                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5917                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5918                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5919                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5920                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5921                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5922                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5923                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5924                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5925                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5926                 </links>
5927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5928             <actions>
5929                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5930                 <retrieve />
5931                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5932                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5933             </actions>
5934         </permacrud>
5935         </class>
5936         <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">
5937                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5938                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5939                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5940                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5941                 </fields>
5942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5943                         <actions>
5944                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5945                                 <retrieve/>
5946                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5947                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5948                         </actions>
5949                 </permacrud>
5950         </class>
5951         <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">
5952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5953                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5954                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5955                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5956                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5957                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5958                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5959                 </fields>
5960                 <links>
5961                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5962                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5963                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5964                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5965                 </links>
5966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5967                         <actions>
5968                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5969                                 <retrieve/>
5970                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5971                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5972                         </actions>
5973                 </permacrud>
5974         </class>
5975         <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">
5976                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5977                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5978                         <field name="btype" reporter:datatype="text"/>
5979                         <field name="id" reporter:datatype="id" />
5980                         <field name="name"  reporter:datatype="text"/>
5981                         <field name="description" reporter:datatype="text"/>
5982                         <field name="owner" reporter:datatype="link"/>
5983                         <field name="pub" reporter:datatype="bool"/>
5984                         <field name="create_time" reporter:datatype="timestamp" />
5985                 </fields>
5986                 <links>
5987                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5988                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5989                 </links>
5990         </class>
5991         <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">
5992                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5993                         <field name="id" reporter:datatype="id" />
5994                         <field name="bucket" reporter:datatype="link"/>
5995                         <field name="note" reporter:datatype="text" />
5996                 </fields>
5997                 <links>
5998                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5999                 </links>
6000         </class>
6001         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6002                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6003                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6004                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6005                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6006                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6007                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6008                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6009                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6010                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6011                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6012                 </fields>
6013                 <links>
6014                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6015                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6016                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6017                 </links>
6018         </class>
6019         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6020                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6021                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6022                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6023                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6024                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6025                 </fields>
6026                 <links>
6027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6028                 </links>
6029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6030                         <actions>
6031                                 <retrieve permission="VIEW_USER">
6032                                         <context link="usr" field="home_ou" />
6033                                 </retrieve>
6034                         </actions>
6035                 </permacrud>
6036         </class>
6037     <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">
6038         <fields oils_persist:primary="field">
6039             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6040             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6041             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6042         </fields>
6043         <links/>
6044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045             <actions>
6046                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6047                 <retrieve />
6048                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6049                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6050             </actions>
6051         </permacrud>
6052     </class>
6053         <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">
6054                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6055                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6056                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6057                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6058                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6059                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6060                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6061                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6062                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6063                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6064                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6065                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6066                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6067                 </fields>
6068                 <links>
6069                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6070                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6071                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6072                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6073                 </links>
6074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6075             <actions>
6076                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6077                 <retrieve />
6078                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6079                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6080             </actions>
6081         </permacrud>
6082         </class>
6083         <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">
6084                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6085                         <field name="field" reporter:datatype="link"/>
6086                         <field name="id" reporter:datatype="id" />
6087                         <field name="source" reporter:datatype="link"/>
6088                         <field name="value"  reporter:datatype="text"/>
6089                 </fields>
6090                 <links>
6091                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6092                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6093                 </links>
6094         </class>
6095         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6096                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6097                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6098                         <field name="btype" reporter:datatype="text"/>
6099                         <field name="id" reporter:datatype="id" />
6100                         <field name="name"  reporter:datatype="text"/>
6101                         <field name="description" reporter:datatype="text"/>
6102                         <field name="owner" reporter:datatype="link"/>
6103                         <field name="pub" reporter:datatype="bool"/>
6104                         <field name="create_time" reporter:datatype="timestamp" />
6105                 </fields>
6106                 <links>
6107                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6108                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6109                 </links>
6110         </class>
6111         <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">
6112                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6113                         <field name="id" reporter:datatype="id" />
6114                         <field name="bucket" reporter:datatype="link"/>
6115                         <field name="note" reporter:datatype="text" />
6116                 </fields>
6117                 <links>
6118                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6119                 </links>
6120         </class>
6121         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6122                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6123                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6124                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6125                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6126                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6127                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6128                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6129                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6130                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6131                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6132                 </fields>
6133                 <links>
6134                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6135                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6136                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6137                 </links>
6138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6139             <actions>
6140                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6141                     <context link="xact" jump="usr" field="home_ou"/>
6142                 </retrieve>
6143                         </actions>
6144                 </permacrud>
6145         </class>
6146         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6147                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6148                         <field name="id" reporter:datatype="id" />
6149                         <field name="ind1" />
6150                         <field name="ind2" />
6151                         <field name="record" />
6152                         <field name="subfield" />
6153                         <field name="tag" />
6154                         <field name="value" />
6155                 </fields>
6156                 <links>
6157                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6158                 </links>
6159         </class>
6160         <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">
6161                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6162                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6163                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6164                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6165                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6166                 </fields>
6167                 <links>
6168                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6169                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6170                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6171                 </links>
6172         </class>
6173         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
6174                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6175                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6176                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6177                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6178                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6179                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6180                 </fields>
6181                 <links>
6182                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6183                 </links>
6184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6185             <actions>
6186                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6187                 <retrieve/>
6188                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6189                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6190             </actions>
6191         </permacrud>
6192
6193         </class>
6194         <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">
6195                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6196                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6197                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6198                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6199                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6200                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6201                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6202                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6203                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6204                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6205                 </fields>
6206                 <links>
6207                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6208                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6209                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6210                 </links>
6211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6212             <actions>
6213                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6214                 <retrieve/>
6215                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6216                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6217             </actions>
6218         </permacrud>
6219         </class>
6220         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6222                         <field name="create_date" reporter:datatype="timestamp"/>
6223                         <field name="creator" reporter:datatype="link"/>
6224                         <field name="edit_date" reporter:datatype="timestamp"/>
6225                         <field name="editor" reporter:datatype="link"/>
6226                         <field name="id" reporter:datatype="id" />
6227                         <field name="pub" reporter:datatype="bool"/>
6228                         <field name="record" reporter:datatype="link"/>
6229                         <field name="value"  reporter:datatype="text"/>
6230                 </fields>
6231                 <links>
6232                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6233                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6234                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6235                 </links>
6236         </class>
6237         <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">
6238                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6239                         <field name="balance_owed" reporter:datatype="money" />
6240                         <field name="total_owed" reporter:datatype="money" />
6241                         <field name="total_paid" reporter:datatype="money" />
6242                         <field name="usr" reporter:datatype="link"/>
6243                 </fields>
6244                 <links>
6245                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6246                 </links>
6247         </class>
6248         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6249                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6250                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6251                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6252                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6253                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6254                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6255                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6256                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6257                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6258                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6260                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6261                 </fields>
6262                 <links>
6263                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6264                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6265                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6266                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6267                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6268                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6269                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6270                 </links>
6271         </class>
6272         <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">
6273                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6274                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6275                         <field name="quality" reporter:datatype="int" />
6276                         <field name="source" reporter:datatype="text"/>
6277                         <field name="transcendant" reporter:datatype="bool"/>
6278                         <field name="can_have_copies" reporter:datatype="bool"/>
6279                 </fields>
6280                 <links/>
6281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6282             <actions>
6283                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6284                 <retrieve/>
6285                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6286                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6287             </actions>
6288         </permacrud>
6289         </class>
6290         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6291                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6292                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6293                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6294                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6295                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6296                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6297                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6298                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6299                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6300                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6301                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6302                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6303                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6304                 </fields>
6305                 <links>
6306                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6307                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6308                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6309                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6310                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6311                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6312                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6313                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6314                 </links>
6315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6316                         <actions>
6317                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6318                                         <context link="usr" field="home_ou" />
6319                                 </retrieve>
6320                         </actions>
6321                 </permacrud>
6322         </class>
6323         <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">
6324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6325                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6326                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6327                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6328                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6329                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6330                 </fields>
6331                 <links>
6332                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6333                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6334                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6335                 </links>
6336         </class>
6337         <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">
6338                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6339                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6340                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6341                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6342                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6343                 </fields>
6344                 <links>
6345                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6346                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6347                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6348                 </links>
6349         </class>
6350         <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">
6351                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6352                         <field name="bucket" reporter:datatype="link"/>
6353                         <field name="id" reporter:datatype="id" />
6354                         <field name="target_user" reporter:datatype="link"/>
6355                         <field name="create_time" reporter:datatype="timestamp" />
6356                         <field name="pos" reporter:datatype="int" />
6357                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6358                 </fields>
6359                 <links>
6360                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6361                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6362             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6363                 </links>
6364         </class>
6365         <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">
6366                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6367                         <field name="id" reporter:datatype="id" />
6368                         <field name="item" reporter:datatype="link"/>
6369                         <field name="note" reporter:datatype="text" />
6370                 </fields>
6371                 <links>
6372                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6373                 </links>
6374         </class>
6375         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6376                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6377                         <field name="balance_owed" reporter:datatype="money" />
6378                         <field name="total_owed" reporter:datatype="money" />
6379                         <field name="total_paid" reporter:datatype="money" />
6380                         <field name="usr" reporter:datatype="link"/>
6381                 </fields>
6382                 <links>
6383                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6384                 </links>
6385         </class>
6386         <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">
6387                 <fields oils_persist:primary="code" oils_persist:sequence="">
6388                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6389                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6390                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6391                 </fields>
6392                 <links/>
6393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6394             <actions>
6395                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6396                 <retrieve/>
6397                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6398                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6399             </actions>
6400         </permacrud>
6401         </class>
6402         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6403                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6404                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6405                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6406                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6407                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6408                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6409                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6410                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6411                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6412                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6413                 </fields>
6414                 <links>
6415                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6416                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6417                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6418                 </links>
6419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6420             <actions>
6421                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6422                     <context link="xact" jump="usr" field="home_ou"/>
6423                 </retrieve>
6424                         </actions>
6425                 </permacrud>
6426         </class>
6427         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6428                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6429                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6430                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6431                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6432                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6433                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6434                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6435                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6436                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6437                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6438                 </fields>
6439                 <links>
6440                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6441                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6442                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6443                 </links>
6444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6445             <actions>
6446                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6447                     <context link="xact" jump="usr" field="home_ou"/>
6448                 </retrieve>
6449                         </actions>
6450                 </permacrud>
6451         </class>
6452         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6453                 <fields oils_persist:primary="id" oils_persist:sequence="">
6454                         <field name="checkin_lib" reporter:datatype="link"/>
6455                         <field name="checkin_staff" reporter:datatype="link"/>
6456                         <field name="checkin_time" reporter:datatype="timestamp"/>
6457                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6458                         <field name="circ_staff" reporter:datatype="link"/>
6459                         <field name="desk_renewal" reporter:datatype="bool"/>
6460                         <field name="due_date" reporter:datatype="timestamp"/>
6461                         <field name="duration" reporter:datatype="interval"/>
6462                         <field name="duration_rule" reporter:datatype="link"/>
6463                         <field name="fine_interval" reporter:datatype="interval"/>
6464                         <field name="id" reporter:datatype="id" />
6465                         <field name="max_fine" reporter:datatype="money" />
6466                         <field name="max_fine_rule" reporter:datatype="link"/>
6467                         <field name="opac_renewal" reporter:datatype="bool"/>
6468                         <field name="phone_renewal" reporter:datatype="bool"/>
6469                         <field name="recurring_fine" reporter:datatype="money" />
6470                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6471                         <field name="renewal_remaining" reporter:datatype="int" />
6472             <field name="grace_period" reporter:datatype="interval" />
6473                         <field name="stop_fines" reporter:datatype="text"/>
6474                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6475                         <field name="target_copy" reporter:datatype="link"/>
6476                         <field name="usr" reporter:datatype="link"/>
6477                         <field name="xact_finish" reporter:datatype="timestamp" />
6478                         <field name="xact_start" reporter:datatype="timestamp" />
6479                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6480                 </fields>
6481                 <links>
6482                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6483                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6484                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6485                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6486                 </links>
6487         </class>
6488         <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">
6489                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6490                         <field name="field" reporter:datatype="link"/>
6491                         <field name="id" reporter:datatype="id" />
6492                         <field name="source" reporter:datatype="link"/>
6493                         <field name="value" reporter:datatype="text"/>
6494                 </fields>
6495                 <links>
6496                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6497                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6498                 </links>
6499         </class>
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6502                         <field name="high" reporter:datatype="money" />
6503                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6504                         <field name="low" reporter:datatype="money" />
6505                         <field name="name" reporter:datatype="text"/>
6506                         <field name="normal" reporter:datatype="money" />
6507                         <field name="recurrence_interval" reporter:datatype="interval"/>
6508             <field name="grace_period" reporter:datatype="interval" />
6509                 </fields>
6510                 <links/>
6511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6512             <actions>
6513                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6514                 <retrieve/>
6515                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6516                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6517             </actions>
6518         </permacrud>
6519         </class>
6520         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6521                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6522                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6523                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6524                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6525                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6526                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6527                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6528                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6529                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6530                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6531                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6532                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6533                 </fields>
6534                 <links>
6535                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6536                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6537                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6538                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6539                 </links>
6540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6541             <actions>
6542                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6543                     <context link="xact" jump="usr" field="home_ou"/>
6544                 </retrieve>
6545                         </actions>
6546                 </permacrud>
6547         </class>
6548         <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">
6549                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6550                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6551                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6552                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6553                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6554                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6555                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6556                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6557                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6558                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6559                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6560                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6561                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6562                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6563                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6564                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6565                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6566                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6567                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6568                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6569                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6570                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6571                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6572                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6573                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6574                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6575                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6576                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6577                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6578                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6579                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6580                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6581                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6582                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6583                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6584                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6585                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6587                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6588                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6589                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6590                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6591                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6592                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6593                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6594                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6595                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6596                 </fields>
6597                 <links>
6598                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6599                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6600                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6601                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6602                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6603                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6604                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6605                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6606                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6607                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6608                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6609                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6610                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6611                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6612                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6613                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6614                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6615                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6616                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6617                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6618                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6619                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6620                 </links>
6621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622             <actions>
6623                 <create permission="CREATE_COPY">
6624                     <context link="call_number" field="owning_lib"/>
6625                 </create>
6626                 <retrieve/>
6627                 <update permission="UPDATE_COPY">
6628                     <context link="call_number" field="owning_lib"/>
6629                 </update>
6630                 <delete permission="DELETE_COPY">
6631                     <context link="call_number" field="owning_lib"/>
6632                 </delete>
6633             </actions>
6634         </permacrud>
6635         </class>
6636
6637         <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">
6638                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6639                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6640                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6641                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6642                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6643                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6644                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6646                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6647                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6648                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6649                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6650                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6651                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6652                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6653                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6654                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6655                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6656                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6657                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6658                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6659                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6660                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6661                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6662                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6663                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6664                 </fields>
6665                 <links>
6666                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6667                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6668                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6669                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6671                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6672                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6673                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6674                 </links>
6675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6676                         <actions>
6677                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6678                                 <retrieve />
6679                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6680                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6681                         </actions>
6682                 </permacrud>
6683         </class>
6684
6685         <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">
6686                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6687                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6688                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6689                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6690                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6691                 </fields>
6692                 <links/>
6693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6694             <actions>
6695                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6696                 <retrieve/>
6697                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6698                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6699             </actions>
6700         </permacrud>
6701         </class>
6702         <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">
6703                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6704                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6705                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6706                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6707                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6708                 </fields>
6709                 <links/>
6710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6711             <actions>
6712                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6713                 <retrieve/>
6714                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6715                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6716             </actions>
6717         </permacrud>
6718         </class>
6719         <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">
6720                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6721                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6722                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6723                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6724                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6725                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6726                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6727                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6728                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6729                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6730                 </fields>
6731                 <links>
6732                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6733                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6734                 </links>
6735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6736             <actions>
6737                 <create permission="CREATE_PERM" global_required="true"/>
6738                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6739                 <update permission="UPDATE_PERM" global_required="true"/>
6740                 <delete permission="DELETE_PERM" global_required="true"/>
6741             </actions>
6742         </permacrud>
6743         </class>
6744         <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">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6746                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6747                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6748                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6749                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6750                 </fields>
6751                 <links>
6752                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6753                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6754                 </links>
6755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6756             <actions>
6757                 <create permission="ADMIN_SURVEY">
6758                     <context link="question" jump="survey" field="owner"/>
6759                 </create>
6760                 <retrieve/>
6761                 <update permission="ADMIN_SURVEY">
6762                     <context link="question" jump="survey" field="owner"/>
6763                 </update>
6764                 <delete permission="ADMIN_SURVEY">
6765                     <context link="question" jump="survey" field="owner"/>
6766                 </delete>
6767             </actions>
6768         </permacrud>
6769         </class>
6770         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6772                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6773                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6774                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6775                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6776                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6777                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6778                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6779                 </fields>
6780                 <links>
6781                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6782                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6783                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6784                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6785                 </links>
6786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6787                         <actions>
6788                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6789                         </actions>
6790                 </permacrud>
6791         </class>
6792         <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">
6793                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6794                         <field name="balance_owed" reporter:datatype="money" />
6795                         <field name="total_owed" reporter:datatype="money" />
6796                         <field name="total_paid" reporter:datatype="money" />
6797                         <field name="usr" reporter:datatype="link"/>
6798                 </fields>
6799                 <links>
6800                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6801                 </links>
6802         </class>
6803         <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">
6804                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6805                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6806                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6807                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6808                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6809                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6810                 </fields>
6811                 <links>
6812                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6813                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6814                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6815                 </links>
6816         </class>
6817         <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">
6818                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6819                         <field name="field" reporter:datatype="link"/>
6820                         <field name="id" reporter:datatype="id" />
6821                         <field name="source" reporter:datatype="link"/>
6822                         <field name="value" reporter:datatype="text"/>
6823                 </fields>
6824                 <links>
6825                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6826                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6827                 </links>
6828         </class>
6829         <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">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6831                         <field name="field" reporter:datatype="link"/>
6832                         <field name="id" reporter:datatype="id" />
6833                         <field name="source" reporter:datatype="link"/>
6834                         <field name="value" reporter:datatype="text"/>
6835                 </fields>
6836                 <links>
6837                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6838                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6839                 </links>
6840         </class>
6841         <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">
6842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6843                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6844                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6845                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6846                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6847                 </fields>
6848                 <links>
6849                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6850                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6851                 </links>
6852         </class>
6853         <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">
6854                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6855                         <field name="depth" reporter:datatype="int" />
6856                         <field name="grantable" reporter:datatype="bool"/>
6857                         <field name="grp" reporter:datatype="link"/>
6858                         <field name="id" reporter:datatype="id" />
6859                         <field name="perm" reporter:datatype="link"/>
6860                 </fields>
6861                 <links>
6862                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6863                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6864                 </links>
6865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866             <actions>
6867                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6868                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6869                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6870                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6871             </actions>
6872         </permacrud>
6873         </class>
6874         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6875                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6876                         <field name="items" oils_persist:virtual="true" />
6877                         <field name="btype" reporter:datatype="text"/>
6878                         <field name="id" reporter:datatype="id" />
6879                         <field name="name" reporter:datatype="text"/>
6880                         <field name="description" reporter:datatype="text"/>
6881                         <field name="owner" reporter:datatype="link"/>
6882                         <field name="pub" reporter:datatype="bool"/>
6883                         <field name="create_time" reporter:datatype="timestamp" />
6884                 </fields>
6885                 <links>
6886                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6887                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6888                 </links>
6889         </class>
6890         <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">
6891                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6892                         <field name="id" reporter:datatype="id" />
6893                         <field name="bucket" reporter:datatype="link"/>
6894                         <field name="note" reporter:datatype="text" />
6895                 </fields>
6896                 <links>
6897                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6898                 </links>
6899         </class>
6900         <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">
6901                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6902                         <field name="id" reporter:datatype="int" />
6903                         <field name="usr" reporter:datatype="link"/>
6904                         <field name="work_ou" reporter:datatype="link"/>
6905                 </fields>
6906                 <links>
6907                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6908                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6909                 </links>
6910         </class>
6911         <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">
6912                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6913                         <field name="depth" reporter:datatype="int"/>
6914                         <field name="grantable" reporter:datatype="bool"/>
6915                         <field name="id" reporter:datatype="id" />
6916                         <field name="perm" reporter:datatype="link"/>
6917                         <field name="usr" reporter:datatype="link"/>
6918                 </fields>
6919                 <links>
6920                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6921                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6922                 </links>
6923         </class>
6924         <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">
6925                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6926                         <field name="object_id" reporter:datatype="text"/>
6927                         <field name="grantable" reporter:datatype="bool"/>
6928                         <field name="id" reporter:datatype="id" />
6929                         <field name="perm" reporter:datatype="link"/>
6930                         <field name="usr" reporter:datatype="link"/>
6931                         <field name="object_type" reporter:datatype="text"/>
6932                 </fields>
6933                 <links>
6934                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6935                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6936                 </links>
6937         </class>
6938         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="">
6940                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6941                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6942                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6943                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6944                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6945                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6946                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6947                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6948                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6949                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6950                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6951                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6952                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6953                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6954                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
6955                 </fields>
6956                 <links>
6957                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6958                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6959                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6960                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6961                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6962                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6963                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6964                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="map"/>
6965                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6966                 </links>
6967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6968             <actions>
6969                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6970                     <context link="xact" jump="usr" field="home_ou"/>
6971                 </retrieve>
6972                         </actions>
6973                 </permacrud>
6974         </class>
6975         <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">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="">
6977                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6978                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6979                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6980                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6981                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6982                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6983                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6984                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6985                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6986                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6987                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6988                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6989                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6990                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6991                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6992                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
6993                 </fields>
6994                 <links>
6995                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6996                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6997                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6998                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6999                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7000                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7001                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7002                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="mvp"/>
7003                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7004                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7005                 </links>
7006         </class>
7007         <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">
7008                 <fields oils_persist:primary="id" oils_persist:sequence="">
7009                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7010                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7011                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7012                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7013                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7014                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7015                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7016                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7017                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7018                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7019                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7020                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7021                 </fields>
7022                 <links>
7023                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7024                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7025                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7026                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7027                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="mvp"/>
7028                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7029                 </links>
7030         </class>
7031         <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">
7032                 <fields oils_persist:primary="id" oils_persist:sequence="">
7033                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7034                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7035                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7036                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7037                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7038                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7039                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7040                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7041                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7042                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7043                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7044                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7045                 </fields>
7046                 <links>
7047                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7048                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7049                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7050                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7051                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7052                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7053                 </links>
7054         </class>
7055         <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">
7056                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7057                         <field name="bucket" reporter:datatype="link"/>
7058                         <field name="id" reporter:datatype="id" />
7059                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7060                         <field name="create_time" reporter:datatype="timestamp" />
7061                         <field name="pos" reporter:datatype="int" />
7062                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7063                 </fields>
7064                 <links>
7065                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7066                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7067             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7068                 </links>
7069         </class>
7070         <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">
7071                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7072                         <field name="id" reporter:datatype="id" />
7073                         <field name="item" reporter:datatype="link"/>
7074                         <field name="note" reporter:datatype="text" />
7075                 </fields>
7076                 <links>
7077                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7078                 </links>
7079         </class>
7080         <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">
7081                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7082                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7083                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7084                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7085                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7086                 </fields>
7087                 <links>
7088                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7089                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7090                 </links>
7091         </class>
7092     <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">
7093         <fields oils_persist:primary="field">
7094             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7095             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7096             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7097         </fields>
7098         <links/>
7099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7100             <actions>
7101                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7102                 <retrieve />
7103                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7104                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7105             </actions>
7106         </permacrud>
7107     </class>
7108         <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">
7109                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7110                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7111                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7112                 </fields>
7113                 <links/>
7114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7115             <actions>
7116                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7117                 <retrieve/>
7118                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7119                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7120             </actions>
7121         </permacrud>
7122         </class>
7123
7124
7125         <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">
7126                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7127                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7128                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7129                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7130                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7131                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7132                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7133                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7134                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7135                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7136                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7137                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7138                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7139                 </fields>
7140                 <links>
7141                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7142                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7143                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7144                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7145                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7146                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7147                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7148                 </links>
7149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7150             <actions>
7151                 <create permission="TRANSIT_COPY">
7152                     <context link="target_copy" field="owner"/>
7153                 </create>
7154                 <retrieve/>
7155                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7156                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7157             </actions>
7158         </permacrud>
7159         </class>
7160         <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">
7161                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7162                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7163                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7164                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7165                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7166                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7167                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7168                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7169                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7170                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7171                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7172                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7173                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7174                 </fields>
7175                 <links>
7176                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7177                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7178                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7179                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7180                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7181                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7182                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7183                 </links>
7184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7185             <actions>
7186                 <create permission="TRANSIT_COPY" context_field="owner">
7187                     <context link="target_copy" field="circ_lib"/>
7188                 </create>
7189                 <retrieve/>
7190                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7191                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7192             </actions>
7193         </permacrud>
7194         </class>
7195         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
7196                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7197                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7198                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7199                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7200                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7201                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7202                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7203                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7204                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7205                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7206                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7207                 </fields>
7208                 <links>
7209                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7210                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7211                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7212                 </links>
7213         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7214             <actions>
7215                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7216                     <context link="xact" jump="usr" field="home_ou"/>
7217                 </retrieve>
7218                         </actions>
7219                 </permacrud>
7220         </class>
7221         <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">
7222                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7223                         <field name="grp" />
7224                         <field name="id" reporter:datatype="id" />
7225                         <field name="usr" />
7226                 </fields>
7227                 <links>
7228                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7229                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7230                 </links>
7231         </class>
7232         <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">
7233                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7234                         <field name="id" reporter:datatype="id" />
7235                         <field name="fq_field" reporter:datatype="text"/>
7236                         <field name="identity_value" reporter:datatype="text"/>
7237                         <field name="translation" reporter:datatype="text"/>
7238                         <field name="string" reporter:datatype="text"/>
7239                 </fields>
7240                 <links>
7241                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7242                 </links>
7243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7244             <actions>
7245                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7246                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7247                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7248                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7249             </actions>
7250         </permacrud>
7251         </class>
7252         <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">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7254                         <field name="id" reporter:datatype="id" />
7255                         <field name="fm_class" reporter:datatype="text"/>
7256                         <field name="field" reporter:datatype="text"/>
7257                         <field name="owner" reporter:datatype="org_unit"/>
7258                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7259                 </fields>
7260                 <links>
7261                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7262                 </links>
7263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7264             <actions>
7265                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7266                 <retrieve/>
7267                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7268                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7269             </actions>
7270         </permacrud>
7271         </class>
7272         <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">
7273                 <fields oils_persist:primary="code">
7274                         <field name="code" reporter:datatype="id" />
7275                         <field name="marc_code" reporter:datatype="text"/>
7276                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7277                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7278                 </fields>
7279                 <links/>
7280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7281             <actions>
7282                 <create permission="CREATE_LOCALE" global_required="true"/>
7283                 <retrieve/>
7284                 <update permission="UPDATE_LOCALE" global_required="true"/>
7285                 <delete permission="DELETE_LOCALE" global_required="true"/>
7286             </actions>
7287         </permacrud>
7288         </class>
7289         <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">
7290                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7291                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7292                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7293                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7294             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7295                 </fields>
7296                 <links>
7297                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7298                 </links>
7299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7300             <actions>
7301                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7302                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7303                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7304                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7305             </actions>
7306         </permacrud>
7307         </class>
7308
7309         <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">
7310                 <fields oils_persist:primary="id">
7311                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7312                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7313                 </fields>
7314                 <links/>
7315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7316             <actions>
7317                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7318                 <retrieve/>
7319                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7320                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7321             </actions>
7322         </permacrud>
7323         </class>
7324
7325         <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">
7326                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7327                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7328                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7329                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7330                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7331                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7332                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7333                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7334                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7335                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7336                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7337                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7338                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7339                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7340                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7341                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7342                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7343                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7344                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7345                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7346                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7347                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7348                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7349                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7350                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7351                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7352                 </fields>
7353                 <links>
7354                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7355                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7356                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7357                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7358                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7359                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7360                 </links>
7361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7362             <actions>
7363                 <create permission="user_request.create">
7364                     <context link="usr" field="home_ou"/>
7365                                 </create>
7366                 <retrieve permission="user_request.view">
7367                     <context link="usr" field="home_ou"/>
7368                                 </retrieve>
7369                 <update permission="user_request.update">
7370                     <context link="usr" field="home_ou"/>
7371                                 </update>
7372                 <delete permission="user_request.delete">
7373                     <context link="usr" field="home_ou"/>
7374                                 </delete>
7375             </actions>
7376         </permacrud>
7377         </class>
7378
7379         <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">
7380                 <fields oils_persist:primary="code">
7381                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7382                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7383                 </fields>
7384                 <links/>
7385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7386             <actions>
7387                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7388                 <retrieve/>
7389                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7390                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7391             </actions>
7392         </permacrud>
7393         </class>
7394
7395         <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">
7396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7397                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7398                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7399                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7400                         <field reporter:label="Ratio" name="ratio" />
7401                 </fields>
7402                 <links>
7403                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7404                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7405                 </links>
7406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7407                         <actions>
7408                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7409                                 <retrieve/>
7410                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7411                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7412                         </actions>
7413                 </permacrud>
7414         </class>
7415
7416         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7417                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7418                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7419                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7420                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7421                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7422                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7423                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7424                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7425                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7426                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7427                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7428                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7429                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7430                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7431                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7432                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7433                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7434                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7435                 </fields>
7436                 <links>
7437                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7438                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7439             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7440             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7441             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7442                 </links>
7443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7444             <actions>
7445                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7446                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7447                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7448                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7449             </actions>
7450         </permacrud>
7451         </class>
7452
7453         <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">
7454                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7455                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7456                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7457                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7458                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7459                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7460                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7461                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7462                 </fields>
7463                 <links>
7464                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7465                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7466                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7467                 </links>
7468         </class>
7469
7470         <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">
7471                 <fields oils_persist:primary="code">
7472                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7473                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7474                 </fields>
7475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476             <actions>
7477                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7478                 <retrieve/>
7479                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7480                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7481             </actions>
7482                 </permacrud>
7483         </class>
7484
7485         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7486                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7487                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7488                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7489                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7490                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7491                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7492                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7493                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7494                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7495                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7496                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7497                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7498                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7499                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7500                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7501                 </fields>
7502                 <links>
7503                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7504                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7505                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7506                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7507                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7508                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7509                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7510                 </links>
7511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7512             <actions>
7513                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7514                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7515                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7516                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7517             </actions>
7518         </permacrud>
7519         </class>
7520
7521         <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">
7522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7523                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7524                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7525                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7526                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7527                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7528                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7529                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7530                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7531                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7532                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7533                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7534                 </fields>
7535                 <links>
7536                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7537                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7538                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7539                 </links>
7540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7541             <actions>
7542                 <create   permission="ADMIN_INVOICE">
7543                                         <context link="invoice" field="receiver"/>
7544                                 </create>
7545                 <retrieve permission="ADMIN_INVOICE">
7546                                         <context link="invoice" field="receiver"/>
7547                                 </retrieve>
7548                 <update   permission="ADMIN_INVOICE">
7549                                         <context link="invoice" field="receiver"/>
7550                                 </update>
7551                                 <delete   permission="ADMIN_INVOICE">
7552                                         <context link="invoice" field="receiver"/>
7553                                 </delete>
7554             </actions>
7555         </permacrud>
7556         </class>
7557
7558         <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">
7559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7561                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7562                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7563                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7564                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7565                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7566                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7567                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7568                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7569                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7570                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7571                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7572                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7573                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7574                 </fields>
7575                 <links>
7576                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7577                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7578                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7579                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7580                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7581                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7582                 </links>
7583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7584             <actions>
7585                 <create   permission="ADMIN_INVOICE">
7586                                         <context link="invoice" field="receiver"/>
7587                                 </create>
7588                 <retrieve permission="ADMIN_INVOICE">
7589                                         <context link="invoice" field="receiver"/>
7590                                 </retrieve>
7591                 <update   permission="ADMIN_INVOICE">
7592                                         <context link="invoice" field="receiver"/>
7593                                 </update>
7594                                 <delete   permission="ADMIN_INVOICE">
7595                                         <context link="invoice" field="receiver"/>
7596                                 </delete>
7597             </actions>
7598         </permacrud>
7599         </class>
7600
7601         <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">
7602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7603                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7604                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7605                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7606                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7607                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7608                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7609                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7610                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7611                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7612                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7613                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7614                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7615                 </fields>
7616                 <links>
7617                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7618                 </links>
7619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7620             <actions>
7621                 <create permission="ADMIN_PROVIDER">
7622                     <context link="provider" field="owner"/>
7623                 </create>
7624                 <retrieve permission="ADMIN_PROVIDER">
7625                     <context link="provider" field="owner"/>
7626                 </retrieve>
7627                 <update permission="ADMIN_PROVIDER">
7628                     <context link="provider" field="owner"/>
7629                 </update>
7630                 <delete permission="ADMIN_PROVIDER">
7631                     <context link="provider" field="owner"/>
7632                 </delete>
7633             </actions>
7634         </permacrud>
7635         </class>
7636
7637         <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">
7638                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7639                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7640                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7641                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7642                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7643                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7644                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7645         </fields>
7646                 <links>
7647                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7648                 </links>
7649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7650             <actions>
7651                 <create permission="ADMIN_PROVIDER">
7652                     <context link="provider" field="owner"/>
7653                 </create>
7654                 <retrieve permission="ADMIN_PROVIDER">
7655                     <context link="provider" field="owner"/>
7656                 </retrieve>
7657                 <update permission="ADMIN_PROVIDER">
7658                     <context link="provider" field="owner"/>
7659                 </update>
7660                 <delete permission="ADMIN_PROVIDER">
7661                     <context link="provider" field="owner"/>
7662                 </delete>
7663             </actions>
7664         </permacrud>
7665     </class>
7666         <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">
7667                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7668                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7669                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7670                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7671                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7672                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7673                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7674                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7675                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7676                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7677                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7678                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7679                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7680                 </fields>
7681                 <links>
7682                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7683                 </links>
7684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7685             <actions>
7686                 <create permission="ADMIN_PROVIDER">
7687                     <context link="contact" jump='provider' field="owner"/>
7688                 </create>
7689                 <retrieve permission="ADMIN_PROVIDER">
7690                     <context link="contact" jump='provider' field="owner"/>
7691                 </retrieve>
7692                 <update permission="ADMIN_PROVIDER">
7693                     <context link="contact" jump='provider' field="owner"/>
7694                 </update>
7695                 <delete permission="ADMIN_PROVIDER">
7696                     <context link="contact" jump='provider' field="owner"/>
7697                 </delete>
7698             </actions>
7699         </permacrud>
7700         </class>
7701
7702         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7703                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7704                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7705                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7706                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7707                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7708                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7709                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7710                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7711                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7712                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7713                 </fields>
7714                 <links>
7715                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7716                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7717                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7718                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7719                 </links>
7720         </class>
7721
7722         <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">
7723                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7724                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7725                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7726                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7727                 </fields>
7728                 <links>
7729             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7730                 </links>
7731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7732                         <actions>
7733                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7734                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7735                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7736                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7737                         </actions>
7738                 </permacrud>
7739         </class>
7740
7741         <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">
7742                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7743                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7744                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7745                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7746                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7747                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7748                 </fields>
7749                 <links>
7750                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7751                 </links>
7752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7753                         <actions>
7754                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7755                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7756                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7757                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7758                         </actions>
7759                 </permacrud>
7760         </class>
7761
7762         <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">
7763                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7764                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7765                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7766                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7767                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7768                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7769                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7770                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7771                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7772                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7773                 </fields>
7774                 <links>
7775                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7776                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7777             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7778             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7779                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7780                 </links>
7781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7782             <actions>
7783                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7784                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7785                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7786                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7787             </actions>
7788         </permacrud>
7789         </class>
7790
7791         <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">
7792                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7793                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7794                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7795                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7796                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7797                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7798                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7799                 </fields>
7800                 <links>
7801                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7802                 </links>
7803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7804                         <actions>
7805                                 <create permission="ADMIN_FUNDING_SOURCE">
7806                     <context link="funding_source" field="owner"/>
7807                 </create>
7808                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7809                     <context link="funding_source" field="owner"/>
7810                 </retrieve>
7811                                 <update permission="ADMIN_FUNDING_SOURCE">
7812                     <context link="funding_source" field="owner"/>
7813                 </update>
7814                                 <delete permission="ADMIN_FUNDING_SOURCE">
7815                     <context link="funding_source" field="owner"/>
7816                 </delete>
7817                         </actions>
7818                 </permacrud>
7819         </class>
7820
7821         <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">
7822                 <fields oils_persist:primary="id">
7823                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7824                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7825                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7826                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7827                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7828                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7829                 </fields>
7830                 <links>
7831                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7832                 </links>
7833         </class>
7834
7835         <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">
7836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7837                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7838                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7839                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7840                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7841                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7842                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7843                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7844                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7845                 </fields>
7846                 <links>
7847                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7848                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7849                 </links>
7850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7851                         <actions>
7852                                 <create permission="ADMIN_ACQ_FUND">
7853                     <context link="fund" field="org"/>
7854                 </create>
7855                                 <retrieve permission="ADMIN_ACQ_FUND">
7856                     <context link="fund" field="org"/>
7857                 </retrieve>
7858                                 <update permission="ADMIN_ACQ_FUND">
7859                     <context link="fund" field="org"/>
7860                 </update>
7861                                 <delete permission="ADMIN_ACQ_FUND">
7862                     <context link="fund" field="org"/>
7863                 </delete>
7864                         </actions>
7865                 </permacrud>
7866         </class>
7867
7868         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7869                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7870                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7871                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7872                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7873                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7874                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7875                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7876                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7877                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7878                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7879                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7880                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7881                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7882                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7883                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7884                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7885                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7886                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7887                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7888                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7889                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7890                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7891                 </fields>
7892                 <links>
7893                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7894                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7895             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7896             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7897             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7898             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7899             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7900             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7901             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7902             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7903             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7904                 </links>
7905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7906             <actions>
7907                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7908                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7909                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7910                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7911             </actions>
7912         </permacrud>
7913         </class>
7914
7915         <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">
7916                 <fields oils_persist:primary="fund">
7917                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7918                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7919                 </fields>
7920                 <links>
7921                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7922                 </links>
7923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7924             <actions>
7925                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7926                                         <context link="fund" field="org" />
7927                 </retrieve>
7928             </actions>
7929         </permacrud>
7930         </class>
7931
7932         <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">
7933                 <fields oils_persist:primary="fund">
7934                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7935                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7936                 </fields>
7937                 <links>
7938                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7939                 </links>
7940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7941             <actions>
7942                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7943                                         <context link="fund" field="org" />
7944                 </retrieve>
7945             </actions>
7946         </permacrud>
7947         </class>
7948
7949         <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">
7950                 <fields oils_persist:primary="fund">
7951                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7952                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7953                 </fields>
7954                 <links>
7955                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7956                 </links>
7957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7958             <actions>
7959                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7960                                         <context link="fund" field="org" />
7961                 </retrieve>
7962             </actions>
7963         </permacrud>
7964         </class>
7965
7966         <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">
7967                 <fields oils_persist:primary="fund">
7968                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7969                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7970                 </fields>
7971                 <links>
7972                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7973                 </links>
7974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7975             <actions>
7976                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7977                                         <context link="fund" field="org" />
7978                 </retrieve>
7979             </actions>
7980         </permacrud>
7981         </class>
7982
7983         <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">
7984                 <fields oils_persist:primary="fund">
7985                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7986                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7987                 </fields>
7988                 <links>
7989                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7990                 </links>
7991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7992             <actions>
7993                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7994                                         <context link="fund" field="org" />
7995                 </retrieve>
7996             </actions>
7997         </permacrud>
7998         </class>
7999
8000    <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">
8001         <fields oils_persist:primary="fund">
8002             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8003             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8004         </fields>
8005         <links>
8006             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8007         </links>
8008     </class>
8009
8010    <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">
8011         <fields oils_persist:primary="fund">
8012             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8013             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8014         </fields>
8015         <links>
8016             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8017         </links>
8018     </class>
8019
8020    <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">
8021         <fields oils_persist:primary="fund">
8022             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8023             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8024         </fields>
8025         <links>
8026             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8027         </links>
8028     </class>
8029
8030    <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">
8031         <fields oils_persist:primary="fund">
8032             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8033             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8034         </fields>
8035         <links>
8036             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8037         </links>
8038     </class>
8039
8040    <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">
8041         <fields oils_persist:primary="fund">
8042             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8043             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8044         </fields>
8045         <links>
8046             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8047         </links>
8048     </class>
8049
8050         <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">
8051                 <fields oils_persist:primary="funding_source">
8052                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8053                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8054                 </fields>
8055                 <links>
8056                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8057                 </links>
8058         </class>
8059
8060         <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">
8061                 <fields oils_persist:primary="funding_source">
8062                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8063                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8064                 </fields>
8065                 <links>
8066                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8067                 </links>
8068         </class>
8069
8070         <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">
8071                 <fields oils_persist:primary="funding_source">
8072                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8073                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8074                 </fields>
8075                 <links>
8076                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8077                 </links>
8078         </class>
8079
8080         <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">
8081                 <fields oils_persist:primary="fund">
8082                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8083                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8084                 </fields>
8085                 <links>
8086                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8087                 </links>
8088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8089             <actions>
8090                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8091                                         <context link="fund" field="org" />
8092                 </retrieve>
8093             </actions>
8094         </permacrud>
8095     </class>
8096     <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">
8097         <oils_persist:source_definition><![CDATA[
8098             SELECT
8099                 acqf.*,
8100                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8101                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8102                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8103                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8104             FROM
8105                 acq.fund acqf
8106                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8107                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8108                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8109                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8110         ]]></oils_persist:source_definition>
8111         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8112             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8113             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8114             <field reporter:label="Name" name="name" reporter:datatype="text" />
8115             <field reporter:label="Year" name="year" reporter:datatype="int" />
8116             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8117             <field reporter:label="Code" name="code" reporter:datatype="text" />
8118             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8119             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8120             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8121             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8122             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8123
8124             <!-- non fund-native fields -->
8125             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8126             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8127             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8128             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8129         </fields>
8130         <links>
8131             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8132             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8133             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8134         </links>
8135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8136             <actions>
8137                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8138             </actions>
8139         </permacrud>
8140         </class>
8141         <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">
8142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8143                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8144                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8145                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8146                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8147                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8148                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8149                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8150                 </fields>
8151                 <links>
8152                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8153                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8154                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8155                 </links>
8156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8157                         <actions>
8158                                 <create permission="ADMIN_ACQ_FUND">
8159                     <context link="fund" field="org"/>
8160                 </create>
8161                                 <retrieve permission="ADMIN_ACQ_FUND">
8162                     <context link="fund" field="org"/>
8163                 </retrieve>
8164                                 <update permission="ADMIN_ACQ_FUND">
8165                     <context link="fund" field="org"/>
8166                 </update>
8167                                 <delete permission="ADMIN_ACQ_FUND">
8168                     <context link="fund" field="org"/>
8169                 </delete>
8170                         </actions>
8171                 </permacrud>
8172         </class>
8173
8174     <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">
8175         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8176             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8177             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8178             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8179             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8180             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8181             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8182             <field reporter:label="Note" name="note" reporter:datatype="text" />
8183             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8184         </fields>
8185         <links>
8186             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8187             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8188             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8189         </links>
8190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8191                         <actions>
8192                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8193                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8194                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8195                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8196                         </actions>
8197                 </permacrud>
8198     </class>
8199
8200         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8201                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8202                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8203                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8204                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8205                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8206                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8207                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8208                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8209                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8210                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8211                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8212                 </fields>
8213                 <links>
8214                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8215                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8216                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8217                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8218                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8219                 </links>
8220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8221                         <actions>
8222                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8223                         </actions>
8224                 </permacrud>
8225         </class>
8226
8227         <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">
8228                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8229                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8230                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8231                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8232                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8233                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8234                 </fields>
8235                 <links>
8236                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8237                 </links>
8238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8239                         <actions>
8240                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8241                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8242                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8243                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8244                         </actions>
8245                 </permacrud>
8246         </class>
8247
8248         <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">
8249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8250                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8251                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8252                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8253                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8254                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8255                         <field reporter:label="State" name="state" reporter:datatype="text" />
8256                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8257                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8258                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8259                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8260                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8261                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8262                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8263                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8264                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8265                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8266                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8267                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8268                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8269                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8270                 </fields>
8271                 <links>
8272                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8273                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8274                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8275                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8276                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8277                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8278                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8279                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8280                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8281                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8282                 </links>
8283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8284                         <actions>
8285                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8286                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8287                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8288                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8289                         </actions>
8290                 </permacrud>
8291         </class>
8292
8293         <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">
8294                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8295                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8296                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8297                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8298                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8299                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8300                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8301                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8302                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8303                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8304                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8305                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8306                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8307                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8308                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8309                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8310                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8311                 </fields>
8312                 <links>
8313                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8314                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8315                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8316                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8317                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8318                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8319                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8320                 </links>
8321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8322             <actions>
8323                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8324             </actions>
8325                 </permacrud>
8326         </class>
8327
8328         <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">
8329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8330                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8331                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8332                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8333                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8334                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8335                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8336                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8337                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8338                 </fields>
8339                 <links>
8340                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8341                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8342                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8343                 </links>
8344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8345             <actions>
8346                 <create permission="CREATE_PURCHASE_ORDER">
8347                     <context link="purchase_order" field="ordering_agency"/>
8348                 </create>
8349                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8350                     <context link="purchase_order" field="ordering_agency"/>
8351                 </retrieve>
8352                 <update permission="CREATE_PURCHASE_ORDER">
8353                     <context link="purchase_order" field="ordering_agency"/>
8354                 </update>
8355                 <delete permission="CREATE_PURCHASE_ORDER">
8356                     <context link="purchase_order" field="ordering_agency"/>
8357                 </delete>
8358             </actions>
8359                 </permacrud>
8360         </class>
8361
8362         <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">
8363                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8364                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8365                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8366                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8367                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8368                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8369                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8370                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8371                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8372                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8373                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8374                 </fields>
8375                 <links>
8376                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8377                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8378                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8379                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8380                 </links>
8381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8382             <actions>
8383                 <create permission="CREATE_PURCHASE_ORDER">
8384                     <context link="purchase_order" field="ordering_agency"/>
8385                 </create>
8386                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8387                     <context link="purchase_order" field="ordering_agency"/>
8388                 </retrieve>
8389                 <update permission="CREATE_PURCHASE_ORDER">
8390                     <context link="purchase_order" field="ordering_agency"/>
8391                 </update>
8392                 <delete permission="CREATE_PURCHASE_ORDER">
8393                     <context link="purchase_order" field="ordering_agency"/>
8394                 </delete>
8395             </actions>
8396                 </permacrud>
8397         </class>
8398
8399         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8400                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8401                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8402                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8403                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8404                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8405                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8406                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8407                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8408                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8409                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8410                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8411                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8412                         <field reporter:label="State" name="state" reporter:datatype="text" />
8413                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8414                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8415                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8416                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8417                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8418                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8419                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8420                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8421                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8422                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8423                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8424                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8425                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8426                 </fields>
8427                 <links>
8428                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8429                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8430                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8431                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8432                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8433                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8434                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8435                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8436                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8437                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8438                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8439                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8440                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8441                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8442                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8443                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8444                 </links>
8445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8446                         <actions>
8447                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8448                                         <context link="purchase_order" field="ordering_agency"/>
8449                                         <context link="picklist" field="org_unit"/>
8450                                 </retrieve>
8451                         </actions>
8452                 </permacrud>
8453         </class>
8454
8455         <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">
8456                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8457                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8458                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8459                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8460                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8461                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8462                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8463                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8464                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8465                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8466                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8467                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8468                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8469                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8470                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8471                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8472                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8473                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8474                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8475                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8476                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8477                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8478                 </fields>
8479                 <links>
8480                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8482                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8483                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8484                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8485                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8486                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8487                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8488                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8489                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8490                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8491                 </links>
8492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8493                         <actions>
8494                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8495                                         <context link="purchase_order" field="ordering_agency"/>
8496                                         <context link="picklist" field="org_unit"/>
8497                                 </retrieve>
8498                         </actions>
8499                 </permacrud>
8500         </class>
8501
8502         <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">
8503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8504                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8505                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8506                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8507                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8508                 </fields>
8509                 <links>
8510                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8511                 </links>
8512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513                         <actions>
8514                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8515                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8516                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8517                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8518                         </actions>
8519                 </permacrud>
8520         </class>
8521
8522         <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">
8523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8524                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8525                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8526                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8527                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8528                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8529                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8530                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8531                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8532                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8533                 </fields>
8534                 <links>
8535                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8536                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8537                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8538                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8539                 </links>
8540         </class>
8541
8542         <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">
8543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8544                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8545                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8546                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8547                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8548                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8549                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8550                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8551                 </fields>
8552                 <links>
8553                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8554                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8555                 </links>
8556         </class>
8557
8558         <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">
8559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8560                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8561                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8562                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8563                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8564                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8565                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8566                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8567                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8568                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8569                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8570                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8571                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8572                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8573                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8574                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8575                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8576                 </fields>
8577                 <links>
8578                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8579                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8580                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8581                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8582                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8583                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8584                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8585                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8586                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8587                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8588                 </links>
8589         </class>
8590
8591         <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">
8592                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8593                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8594                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8595                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8596                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8597                 </fields>
8598                 <links/>
8599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8600                         <actions>
8601                                 <retrieve />
8602                         </actions>
8603                 </permacrud>
8604         </class>
8605
8606         <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">
8607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8608                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8609                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8610                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8611                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8612                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8613             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8614                 </fields>
8615                 <links/>
8616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8617             <actions>
8618                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8619                 <retrieve />
8620                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8621                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8622             </actions>
8623         </permacrud>
8624         </class>
8625
8626         <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">
8627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8628                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8629                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8631                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8632                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8633                 </fields>
8634                 <links/>
8635         </class>
8636         <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">
8637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8638                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8639                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8640                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8641                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8642                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8643                 </fields>
8644                 <links>
8645                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8646                 </links>
8647         </class>
8648
8649         <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">
8650             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8651                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8652                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8653                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8654                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8655                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8656                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8657         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8658
8659             </fields>
8660             <links>
8661                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8662             </links>
8663             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8664                 <actions>
8665                     <create permission="ADMIN_PROVIDER">
8666                         <context link="provider" field="owner"/>
8667                     </create>
8668                     <retrieve permission="ADMIN_PROVIDER">
8669                         <context link="provider" field="owner"/>
8670                     </retrieve>
8671                     <update permission="ADMIN_PROVIDER">
8672                         <context link="provider" field="owner"/>
8673                     </update>
8674                     <delete permission="ADMIN_PROVIDER">
8675                         <context link="provider" field="owner"/>
8676                     </delete>
8677                 </actions>
8678             </permacrud>
8679         </class>
8680         
8681         <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">
8682             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8683                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8684                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8685                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8686                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8687             </fields>
8688             <links>
8689                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8690             </links>
8691             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8692                 <actions>
8693                     <create permission="ADMIN_PROVIDER">
8694                         <context link="provider" field="owner"/>
8695                     </create>
8696                     <retrieve permission="ADMIN_PROVIDER">
8697                         <context link="provider" field="owner"/>
8698                     </retrieve>
8699                     <update permission="ADMIN_PROVIDER">
8700                         <context link="provider" field="owner"/>
8701                     </update>
8702                     <delete permission="ADMIN_PROVIDER">
8703                         <context link="provider" field="owner"/>
8704                     </delete>
8705                 </actions>
8706             </permacrud>
8707         </class>
8708         
8709         <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">
8710             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8711                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8712                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8713                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8714                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8715                 </fields>
8716                 <links/>
8717         </class>
8718
8719         <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">
8720                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8721                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8722                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8723                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8724                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8725                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8726                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8727                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8728                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8729                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8730                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8731                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8732                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8733                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8734                 </fields>
8735                 <links>
8736                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8737                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8738                 </links>
8739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8740             <actions>
8741                 <create permission="ADMIN_PROVIDER">
8742                     <context link="provider" field="owner"/>
8743                 </create>
8744                 <retrieve permission="ADMIN_PROVIDER">
8745                     <context link="provider" field="owner"/>
8746                 </retrieve>
8747                 <update permission="ADMIN_PROVIDER">
8748                     <context link="provider" field="owner"/>
8749                 </update>
8750                 <delete permission="ADMIN_PROVIDER">
8751                     <context link="provider" field="owner"/>
8752                 </delete>
8753             </actions>
8754         </permacrud>
8755         </class>
8756
8757         <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">
8758                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8759                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8760                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8761                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8762                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8763                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8764                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8765                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8766                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8767                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8768                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8769                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8770                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8771                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8772                 </fields>
8773                 <links>
8774                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8775                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8776                 </links>
8777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8778             <actions>
8779                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8780                     <context link="account" jump="provider" field="owner"/>
8781                 </retrieve>
8782                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8783                     <context link="account" jump="provider" field="owner"/>
8784                 </update>
8785                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8786                     <context link="account" jump="provider" field="owner"/>
8787                 </delete>
8788             </actions>
8789         </permacrud>
8790         </class>
8791
8792
8793         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8794                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8795                         <field name="id" reporter:datatype="id" />
8796                         <field name="parent" reporter:datatype="link"/>
8797                         <field name="owner" reporter:datatype="link"/>
8798                         <field name="create_time" reporter:datatype="timestamp"/>
8799                         <field name="name" reporter:datatype="text"/>
8800                         <field name="shared" reporter:datatype="bool"/>
8801                         <field name="share_with" reporter:datatype="link"/>
8802                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8803                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8804                 </fields>
8805                 <links>
8806                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8807                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8808                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8809                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8810                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8811                 </links>
8812         </class>
8813         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8814                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8815                         <field name="id" reporter:datatype="id" />
8816                         <field name="parent" reporter:datatype="link"/>
8817                         <field name="owner" reporter:datatype="link"/>
8818                         <field name="create_time" reporter:datatype="timestamp"/>
8819                         <field name="name" reporter:datatype="text"/>
8820                         <field name="shared" reporter:datatype="bool"/>
8821                         <field name="share_with" reporter:datatype="link"/>
8822                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8823                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8824                 </fields>
8825                 <links>
8826                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8827                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8828                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8829                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8830                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8831                 </links>
8832         </class>
8833         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8834                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8835                         <field name="id" reporter:datatype="id" />
8836                         <field name="parent" reporter:datatype="link"/>
8837                         <field name="owner" reporter:datatype="link"/>
8838                         <field name="create_time" reporter:datatype="timestamp"/>
8839                         <field name="name" reporter:datatype="text"/>
8840                         <field name="shared" reporter:datatype="bool"/>
8841                         <field name="share_with" reporter:datatype="link"/>
8842                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8843                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8844                 </fields>
8845                 <links>
8846                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8847                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8848                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8849                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8850                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8851                 </links>
8852         </class>
8853         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8854                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8855                         <field name="id" reporter:datatype="id" />
8856                         <field name="owner" reporter:datatype="link"/>
8857                         <field name="create_time" reporter:datatype="timestamp"/>
8858                         <field name="name" reporter:datatype="text"/>
8859                         <field name="data" reporter:datatype="text"/>
8860                         <field name="folder" reporter:datatype="link"/>
8861                         <field name="description" reporter:datatype="text"/>
8862                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8863                 </fields>
8864                 <links>
8865                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8866                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8867                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8868                 </links>
8869         </class>
8870         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8871                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8872                         <field name="id" reporter:datatype="id" />
8873                         <field name="owner" reporter:datatype="link"/>
8874                         <field name="create_time" reporter:datatype="timestamp"/>
8875                         <field name="template" reporter:datatype="link"/>
8876                         <field name="data" reporter:datatype="text"/>
8877                         <field name="folder" reporter:datatype="link"/>
8878                         <field name="recur" reporter:datatype="bool"/>
8879                         <field name="recurrence" reporter:datatype="interval"/>
8880                         <field name="name" reporter:datatype="text"/>
8881                         <field name="description" reporter:datatype="text"/>
8882                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8883                 </fields>
8884                 <links>
8885                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8886                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8887                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8888                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8889                 </links>
8890         </class>
8891         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8892                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8893                         <field name="id" reporter:datatype="id" />
8894                         <field name="runner" reporter:datatype="link"/>
8895                         <field name="start_time" reporter:datatype="timestamp"/>
8896                         <field name="complete_time" reporter:datatype="timestamp"/>
8897                         <field name="run_time" reporter:datatype="timestamp"/>
8898                         <field name="email" reporter:datatype="text"/>
8899                         <field name="excel_format" reporter:datatype="bool"/>
8900                         <field name="csv_format" reporter:datatype="bool"/>
8901                         <field name="html_format" reporter:datatype="bool"/>
8902                         <field name="error_code" reporter:datatype="int"/>
8903                         <field name="error_text" reporter:datatype="text"/>
8904                         <field name="report" reporter:datatype="link"/>
8905                         <field name="folder" reporter:datatype="link"/>
8906                         <field name="chart_pie" reporter:datatype="bool"/>
8907                         <field name="chart_bar" reporter:datatype="bool"/>
8908                         <field name="chart_line" reporter:datatype="bool"/>
8909                 </fields>
8910                 <links>
8911                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8912                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8913                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8914                 </links>
8915         </class>
8916         <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">
8917                 <fields oils_persist:primary="id">
8918                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8919                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8920                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8921                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8922                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8923                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8924                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8925                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8926                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8927                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8928                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8929                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8930                 </fields>
8931                 <links>
8932                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8933                 </links>
8934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8935                         <actions>
8936                                 <retrieve />
8937                         </actions>
8938                 </permacrud>
8939         </class>
8940         <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">
8941                 <fields oils_persist:primary="id">
8942                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8943                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8944                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8945                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8946                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8947                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8948                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8949                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8950                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8951                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8952                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8953                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8954                 </fields>
8955                 <links>
8956                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8957                 </links>
8958         </class>
8959         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8960                 <fields oils_persist:primary="id">
8961                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8962                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8963                         <field reporter:label="Fingerprint" name="fingerprint" />
8964                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8965                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8966                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8967                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8968                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8969                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8970                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8971                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8972                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8973                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8974                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8975                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8976                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8977                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8978                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8979                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8980                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8981                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8982                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8983                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8984                 </fields>
8985                 <links>
8986                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8987                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8988                 </links>
8989         </class>
8990         <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">
8991                 <fields oils_persist:primary="id">
8992                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8993                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8994                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8995                 </fields>
8996                 <links>
8997                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8998                 </links>
8999         </class>
9000         <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">
9001                 <fields oils_persist:primary="id">
9002                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9003                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9004                 </fields>
9005                 <links>
9006                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9007                 </links>
9008         </class>
9009         <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">
9010                 <fields oils_persist:primary="id">
9011                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9012                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9013                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9014                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9015                 </fields>
9016                 <links>
9017                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9018                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9019                 </links>
9020         </class>
9021         <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">
9022                 <fields oils_persist:primary="xact">
9023                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9024                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9025                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9026                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9027                 </fields>
9028                 <links>
9029                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9030                 </links>
9031         </class>
9032         <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">
9033                 <fields oils_persist:primary="xact">
9034                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9035                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9036                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9037                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9038                 </fields>
9039                 <links>
9040                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9041                 </links>
9042         </class>
9043         <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)">
9044                 <fields oils_persist:primary="id">
9045                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9046                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9047                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9048                 </fields>
9049                 <links>
9050                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9051                 </links>
9052         </class>
9053         <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">
9054                 <fields oils_persist:primary="id">
9055                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9056                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9057                 </fields>
9058                 <links>
9059                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9060                 </links>
9061         </class>
9062         <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">
9063                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9064                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9065                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9066                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9067                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9068                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9069                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9070                 </fields>
9071                 <links>
9072                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9073                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9074                 </links>
9075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9076                         <actions>
9077                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9078                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9079                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9080                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9081                         </actions>
9082                 </permacrud>
9083         </class>
9084         <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">
9085                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9086                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9087                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9088                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9089                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9090                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9091                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9092                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9093                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9094                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9095                 </fields>
9096                 <links>
9097                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9098                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9099                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9100                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9101                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9102                 </links>
9103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9104                         <actions>
9105                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9106                                         <context link="formula" field="owner"/>
9107                                 </create>
9108                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9109                                         <context link="formula" field="owner"/>
9110                                 </retrieve>
9111                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9112                                         <context link="formula" field="owner"/>
9113                                 </update>
9114                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9115                                         <context link="formula" field="owner"/>
9116                                 </delete>
9117                         </actions>
9118                 </permacrud>
9119         </class>
9120
9121         <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">
9122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9123                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9124                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9125                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9126                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9127                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9128                 </fields>
9129                 <links>
9130                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9131                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9132                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9133                 </links>
9134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9135                         <actions>
9136                                 <create permission="CREATE_PURCHASE_ORDER">
9137                                         <context link="formula" field="owner"/>
9138                 </create>
9139                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9140                                         <context link="formula" field="owner"/>
9141                 </retrieve>
9142                                 <update permission="CREATE_PURCHASE_ORDER">
9143                                         <context link="formula" field="owner"/>
9144                 </update>
9145                                 <delete permission="CREATE_PURCHASE_ORDER">
9146                                         <context link="formula" field="owner"/>
9147                 </delete>
9148                         </actions>
9149                 </permacrud>
9150         </class>
9151
9152         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9153                 <fields oils_persist:primary="id">
9154                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9155                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9156                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9157                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9158                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9159                 </fields>
9160                 <links>
9161                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9162                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9163                 </links>
9164         </class>
9165
9166         <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">
9167                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9168                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9169                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9170                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9171                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9172                 </fields>
9173                 <links>
9174                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9175                 </links>
9176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9177                         <actions>
9178                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9179                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9180                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9181                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9182                         </actions>
9183                 </permacrud>
9184         </class>
9185
9186         <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">
9187                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9188                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9189                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9190                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9191                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9192                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9193                 </fields>
9194                 <links>
9195                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9196                 </links>
9197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9198                         <actions>
9199                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9200                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9201                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9202                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9203                         </actions>
9204                 </permacrud>
9205         </class>
9206
9207         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9208                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9209                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9210                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9211                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9212                 </fields>
9213                 <links>
9214                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9215                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9216                 </links>
9217         </class>
9218
9219         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9220                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9221                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9222                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9223                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9224                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9225                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9226                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9227                 </fields>
9228                 <links>
9229                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9230                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9231                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9232                 </links>
9233         </class>
9234
9235         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9236                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9237                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9238                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9239                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9240                 </fields>
9241                 <links>
9242                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9243                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9244                 </links>
9245         </class>
9246
9247         <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">
9248                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9249                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9250                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9251                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9252                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9253                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9254                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9255                 </fields>
9256                 <links>
9257                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9258                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9260                 </links>
9261         </class>
9262
9263         <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">
9264                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9265                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9266                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9267                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9268                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9269                 </fields>
9270                 <links>
9271                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9272                 </links>
9273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9274             <actions>
9275                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9276                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9277                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9278                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9279             </actions>
9280                 </permacrud>
9281         </class>
9282
9283         <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">
9284                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9285                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9286                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9287                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9288                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9289                 </fields>
9290                 <links>
9291                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9292                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9293                 </links>
9294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9295                         <actions>
9296                                 <create permission="ADMIN_CLAIM_POLICY">
9297                                         <context link="claim_policy" field="org_unit"/>
9298                 </create>
9299                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9300                                         <context link="claim_policy" field="org_unit"/>
9301                 </retrieve>
9302                                 <update permission="ADMIN_CLAIM_POLICY">
9303                                         <context link="claim_policy" field="org_unit"/>
9304                 </update>
9305                                 <delete permission="ADMIN_CLAIM_POLICY">
9306                                         <context link="claim_policy" field="org_unit"/>
9307                 </delete>
9308                         </actions>
9309                 </permacrud>
9310         </class>
9311
9312     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9313         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9314             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9315             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9316             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9317             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9318             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9319             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9320             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9321             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9322             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9323             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9324             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9325             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9326             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9327             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9328             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9329             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9330         </fields>
9331         <links>
9332             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9333         </links>
9334     </class>
9335
9336     <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">
9337         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9338             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9339             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9340             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9341             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9342             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9343         </fields>
9344     </class>
9345
9346     <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">
9347         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9348             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9349             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9350             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9351             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9352             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9353             <field reporter:label="City" name="city" reporter:datatype="text"/>
9354             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9355             <field reporter:label="State" name="state" reporter:datatype="text"/>
9356             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9357             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9358             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9359         </fields>
9360     </class>
9361
9362     <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">
9363         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9364             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9365             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9366             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9367             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9368             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9369             <field reporter:label="City" name="city" reporter:datatype="text"/>
9370             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9371             <field reporter:label="State" name="state" reporter:datatype="text"/>
9372             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9373             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9374             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9375         </fields>
9376     </class>
9377
9378     <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">
9379         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9380             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9381             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9382             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9383             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9384             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9385             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9386         </fields>
9387     </class>
9388
9389         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9390                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9391                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9392                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9393                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9394                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9395                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9396                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9397                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9398                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9399                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9400                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9401                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9402                 </fields>
9403                 <links>
9404                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9405                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9406                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9407                 </links>
9408         </class>
9409
9410         <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">
9411                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9412                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9413                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9414                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9415                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9416                 </fields>
9417                 <links>
9418                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9419                 </links>
9420         </class>
9421
9422     <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">
9423         <fields>
9424             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9425             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9426             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9427         </fields>
9428                 <links>
9429                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9430                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9431                 </links>
9432     </class>
9433
9434     <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">
9435         <fields>
9436             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9437             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9438         </fields>
9439                 <links>
9440                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9441                 </links>
9442     </class>
9443
9444     <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">
9445         <fields>
9446             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9447             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9448             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9449         </fields>
9450                 <links>
9451                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9452                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9453                 </links>
9454     </class>
9455
9456     <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">
9457         <fields>
9458             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9459             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9460         </fields>
9461                 <links>
9462                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9463                 </links>
9464     </class>
9465
9466     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9467                 <oils_persist:source_definition>
9468
9469             SELECT  DISTINCT l.*
9470               FROM  action.unfulfilled_hold_loops l
9471                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9472               WHERE l.count = m.max
9473
9474                 </oils_persist:source_definition>
9475         <fields>
9476             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9477             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9478             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9479         </fields>
9480                 <links>
9481                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9482                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9483                 </links>
9484     </class>
9485
9486         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9487                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9488                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9489                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9490                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9491                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9492                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9493                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9494                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9495                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9496                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9497                 </fields>
9498                 <links>
9499                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9500                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9501                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9502                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9503                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9504                 </links>
9505         </class>
9506
9507         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9508                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9509                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9510                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9511                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9512                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9513                 </fields>
9514                 <links>
9515                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9516                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9517                 </links>
9518         </class>
9519
9520         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9521                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9522                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9523                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9524                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9525                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9526                 </fields>
9527                 <links>
9528                 </links>
9529         </class>
9530
9531         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9532                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9533                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9534                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9535                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9536                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9537                 </fields>
9538                 <links>
9539                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9540                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9541                 </links>
9542         </class>
9543         
9544         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9545                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9546                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9547                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9548                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9549                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9550                 </fields>
9551                 <links>
9552                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9553                 </links>
9554         </class>
9555         
9556         <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">
9557                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9558                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9559                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9560                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9561                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9562                 </fields>
9563                 <links>
9564                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9565                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9566                 </links>
9567         </class>
9568
9569         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9570                 <fields oils_persist:primary="name">
9571                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9572                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9573                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9574                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9575                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9576                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9577                 </fields>
9578                 <links>
9579                 </links>
9580         </class>
9581
9582         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9583                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9584                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9585                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9586                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9587                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9588                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9589                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9590                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9591                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9592                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9593                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9594                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9595                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9596                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9597                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9598                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9599                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9600                 </fields>
9601                 <links>
9602                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9603                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9604                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9605                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9606                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9607                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9608                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9609                 </links>
9610         </class>
9611
9612         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9613                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9614                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9615                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9616                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9617                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9618                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9619                 </fields>
9620                 <links>
9621                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9622                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9623                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9624                 </links>
9625         </class>
9626
9627         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9628                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9629                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9630                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9631                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9632                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9633                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9634                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9635                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9636                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9637                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9638                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9639                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9640                 </fields>
9641                 <links>
9642                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9643                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9644                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9645                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9646                 </links>
9647         </class>
9648
9649         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9650                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9651                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9652                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9653                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9654                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9655                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9656                 </fields>
9657                 <links>
9658                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9659                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9660                 </links>
9661         </class>
9662
9663         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9664                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9665                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9666                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9667                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9668                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9669                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9670                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9671                 </fields>
9672                 <links>
9673                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9674                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9675                 </links>
9676         </class>
9677
9678         <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">
9679                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9680                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9681                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9682                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9683                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9684                 </fields>
9685                 <links>
9686                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9687                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9688                 </links>
9689         </class>
9690
9691         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9692                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9693                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9694                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9695                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9696                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9697                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9698                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9699                 </fields>
9700                 <links>
9701                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9702                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9703                 </links>
9704         </class>
9705
9706         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9707                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9708                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9709                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9710                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9711                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9712                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9713                 </fields>
9714                 <links>
9715                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9716                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9717                 </links>
9718         </class>
9719
9720         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9721                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9722                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9723                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9724                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9725                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9726                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9727                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9728                 </fields>
9729                 <links>
9730                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9731                 </links>
9732         </class>
9733
9734         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9735                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9736                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9737                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9738                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9739                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9740                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9741                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9742                 </fields>
9743                 <links>
9744                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9745                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9746                 </links>
9747         </class>
9748
9749         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9750                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9751                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9752                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9753                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9754                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9755                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9756                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9757                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9758                 </fields>
9759                 <links>
9760                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9761                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9762                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9763                 </links>
9764         </class>
9765
9766         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9767                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9768                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9769                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9770                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9771                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9772                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9773                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9774                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9775                 </fields>
9776                 <links>
9777                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9778                 </links>
9779         </class>
9780
9781         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9782                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9783                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9784                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9785                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9787                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9788                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9789                 </fields>
9790                 <links>
9791                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9792                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9793                 </links>
9794         </class>
9795
9796         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9797                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9798                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9799                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9800                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9801                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9802                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9803                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9804                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9805                 </fields>
9806                 <links>
9807                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9808                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9809                 </links>
9810         </class>
9811
9812         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9813                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9814                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9815                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9816                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9817                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9818                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9819                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9820                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9821                 </fields>
9822                 <links>
9823                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9824                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9825                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9826                 </links>
9827         </class>
9828
9829         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9830                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9831                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9832                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9833                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9834                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9835                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9836                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9837                 </fields>
9838                 <links>
9839                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9840                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9841                 </links>
9842         </class>
9843
9844         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9845                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9846                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9847                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9848                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9849                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9850                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9851                 </fields>
9852                 <links>
9853                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9854                 </links>
9855         </class>
9856
9857         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9858                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9859                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9860                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9861                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9862                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9863                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9864                 </fields>
9865                 <links>
9866                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9867                 </links>
9868         </class>
9869
9870         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9871                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9872                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9873                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9874                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9875                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9876                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9877                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9878                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9879                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9880                 </fields>
9881                 <links>
9882                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9883                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9884                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9885                 </links>
9886         </class>
9887
9888         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9889                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9890                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9891                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9892                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9893                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9894                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9895                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9896                 </fields>
9897                 <links>
9898                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9899                 </links>
9900         </class>
9901
9902         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9903                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9904                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9905                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9906                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9907                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9908                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9909                 </fields>
9910                 <links>
9911                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9912                 </links>
9913         </class>
9914
9915         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9916                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9917                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9918                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9919                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9920                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9921                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9922                 </fields>
9923                 <links>
9924                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9925                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9926                 </links>
9927         </class>
9928
9929         <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">
9930                 <fields oils_persist:primary="id">
9931                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9932                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9933                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9934                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9935                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9936                 </fields>
9937                 <links>
9938                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9939                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9940                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9941                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9942                 </links>
9943         </class>
9944
9945         <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">
9946                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9947                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9948                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9949                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9950                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9951                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9952                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9953                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9954                 </fields>
9955                 <links/>
9956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9957                         <actions>
9958                                 <retrieve/>
9959                         </actions>
9960                 </permacrud>
9961         </class>
9962
9963         <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">
9964                 <fields oils_persist:primary="ptype_key">
9965                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9966                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9967                 </fields>
9968                 <links/>
9969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9970                         <actions>
9971                                 <retrieve/>
9972                         </actions>
9973                 </permacrud>
9974         </class>
9975
9976         <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">
9977                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9978                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9979                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9980                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9981                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9982                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9983                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9984                 </fields>
9985                 <links>
9986                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9987                 </links>
9988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9989                         <actions>
9990                                 <retrieve/>
9991                         </actions>
9992                 </permacrud>
9993         </class>
9994
9995         <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">
9996                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9997                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9998                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9999                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10000                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10001                 </fields>
10002                 <links>
10003                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10004                 </links>
10005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10006                         <actions>
10007                                 <retrieve/>
10008                         </actions>
10009                 </permacrud>
10010         </class>
10011
10012     <class
10013         id="uvs"
10014         controller="open-ils.cstore open-ils.pcrud"
10015         oils_obj:fieldmapper="url_verify::session"
10016         oils_persist:tablename="url_verify.session"
10017         reporter:label="URL Verification Session"
10018     >
10019         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10020             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10021             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10022                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10023             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10024             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10025             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10026             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10027             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10028             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10029         </fields>
10030
10031         <links>
10032             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10033             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10034             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10035             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10036             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10037         </links>
10038
10039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10040             <actions>
10041                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10042             </actions>
10043         </permacrud>
10044
10045     </class>
10046
10047     <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">
10048         <oils_persist:source_definition>
10049             SELECT
10050                 cbrebi.id AS id,  -- so we can have a pkey in our view
10051                 uvs.id AS session,
10052                 uvs.owning_lib,
10053                 cbrebi.target_biblio_record_entry
10054             FROM url_verify.session uvs
10055             JOIN container.biblio_record_entry_bucket cbreb
10056                 ON (uvs.container = cbreb.id)
10057             JOIN container.biblio_record_entry_bucket_item cbrebi
10058                 ON (cbrebi.bucket = cbreb.id)
10059         </oils_persist:source_definition>
10060         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10061             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10062             <field reporter:label="Session" name="session" reporter:datatype="link" />
10063             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10064             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10065         </fields>
10066         <links>
10067             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10068             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10069             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10070         </links>
10071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10072             <actions>
10073                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10074             </actions>
10075         </permacrud>
10076     </class>
10077
10078     <class
10079         id="uvus"
10080         controller="open-ils.cstore open-ils.pcrud"
10081         oils_obj:fieldmapper="url_verify::url_selector"
10082         oils_persist:tablename="url_verify.url_selector"
10083         reporter:label="URL Verification URL Selector"
10084     >
10085         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10086             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10087             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10088                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10089             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10090         </fields>
10091
10092         <links>
10093             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10094             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10095         </links>
10096
10097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10098             <actions>
10099                 <create permission="URL_VERIFY">
10100                     <context link="session" field="owning_lib"/>
10101                 </create>
10102                 <retrieve permission="URL_VERIFY">
10103                     <context link="session" field="owning_lib"/>
10104                 </retrieve>
10105                 <update permission="URL_VERIFY">
10106                     <context link="session" field="owning_lib"/>
10107                 </update>
10108                 <delete permission="URL_VERIFY">
10109                     <context link="session" field="owning_lib"/>
10110                 </delete>
10111             </actions>
10112         </permacrud>
10113
10114     </class>
10115
10116     <class
10117         id="uvu"
10118         controller="open-ils.cstore open-ils.pcrud"
10119         oils_obj:fieldmapper="url_verify::url"
10120         oils_persist:tablename="url_verify.url"
10121         reporter:label="URL Verification URL"
10122     >
10123         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10124             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10125                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10126                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10127                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10128                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10129             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10130             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10131             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10132             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10133             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10134             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10135             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10136             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10137             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10138             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10139             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10140             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10141             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10142         </fields>
10143
10144         <links>
10145             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10146             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10147             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10148             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10149             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10150         </links>
10151
10152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10153             <actions>
10154                 <create permission="URL_VERIFY">
10155                     <context link="session" field="owning_lib"/>
10156                 </create>
10157                 <retrieve permission="URL_VERIFY">
10158                     <context link="session" field="owning_lib"/>
10159                 </retrieve>
10160                 <update permission="URL_VERIFY">
10161                     <context link="session" field="owning_lib"/>
10162                 </update>
10163                 <delete permission="URL_VERIFY">
10164                     <context link="session" field="owning_lib"/>
10165                 </delete>
10166             </actions>
10167         </permacrud>
10168
10169     </class>
10170
10171     <class
10172         id="uvva"
10173         controller="open-ils.cstore open-ils.pcrud"
10174         oils_obj:fieldmapper="url_verify::verification_attempt"
10175         oils_persist:tablename="url_verify.verification_attempt"
10176         reporter:label="URL Verification Attempt"
10177     >
10178         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10179             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10180                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10181                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10182             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10183             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10184         </fields>
10185
10186         <links>
10187             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10188             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10189         </links>
10190
10191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10192             <actions>
10193                 <create permission="URL_VERIFY">
10194                     <context link="session" field="owning_lib"/>
10195                 </create>
10196                 <retrieve permission="URL_VERIFY">
10197                     <context link="session" field="owning_lib"/>
10198                 </retrieve>
10199                 <update permission="URL_VERIFY">
10200                     <context link="session" field="owning_lib"/>
10201                 </update>
10202                 <delete permission="URL_VERIFY">
10203                     <context link="session" field="owning_lib"/>
10204                 </delete>
10205             </actions>
10206         </permacrud>
10207
10208     </class>
10209
10210     <class
10211         id="uvuv"
10212         controller="open-ils.cstore open-ils.pcrud"
10213         oils_obj:fieldmapper="url_verify::url_verification"
10214         oils_persist:tablename="url_verify.url_verification"
10215         reporter:label="URL Verification"
10216     >
10217         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10218             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10219                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10220                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10221             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10222             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10223             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10224             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10225                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10226         </fields>
10227
10228         <links>
10229             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10230             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10231             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10232         </links>
10233
10234         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10235             <actions>
10236                 <create permission="URL_VERIFY">
10237                     <context link="attempt" jump="session" field="owning_lib"/>
10238                 </create>
10239                 <retrieve permission="URL_VERIFY">
10240                     <context link="attempt" jump="session" field="owning_lib"/>
10241                 </retrieve>
10242                 <update permission="URL_VERIFY">
10243                     <context link="attempt" jump="session" field="owning_lib"/>
10244                 </update>
10245                 <delete permission="URL_VERIFY">
10246                     <context link="attempt" jump="session" field="owning_lib"/>
10247                 </delete>
10248             </actions>
10249         </permacrud>
10250
10251     </class>
10252
10253         <class
10254                 id="cfdi"
10255                 controller="open-ils.cstore open-ils.pcrud"
10256                 oils_obj:fieldmapper="config::filter_dialog_interface"
10257                 oils_persist:tablename="config.filter_dialog_interface"
10258                 reporter:label="FilterDialog Interface">
10259                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10260                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10261                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10262                 </fields>
10263                 <links>
10264                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10265                 </links>
10266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10267                         <actions>
10268                                 <retrieve />
10269                         </actions>
10270                 </permacrud>
10271         </class>
10272
10273         <class
10274                 id="cfdfs"
10275                 controller="open-ils.cstore open-ils.pcrud"
10276                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10277                 oils_persist:tablename="config.filter_dialog_filter_set"
10278                 reporter:label="FilterDialog Filter Set">
10279                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10280                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10281                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10282                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10283                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10284                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10285                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10286                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10287                 </fields>
10288                 <links>
10289                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10290                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10291                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10292                 </links>
10293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10294                         <actions>
10295                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10296                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10297                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10298                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10299                         </actions>
10300                 </permacrud>
10301
10302         </class>
10303
10304         <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">
10305                 <fields oils_persist:primary="code">
10306                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10307                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10308                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10309                 </fields>
10310                 <links/>
10311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10312                         <actions>
10313                                 <retrieve/>
10314                         </actions>
10315                 </permacrud>
10316         </class>
10317
10318         <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">
10319                 <oils_persist:source_definition>
10320
10321             SELECT  b.id,
10322                     MAX(dcp.edit_date) AS last_delete_date
10323              FROM   biblio.record_entry b
10324                     JOIN asset.call_number cn ON (cn.record = b.id)
10325                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10326              WHERE  NOT b.deleted
10327              GROUP BY b.id
10328              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10329
10330                 </oils_persist:source_definition>
10331                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10332                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10333                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10334                 </fields>
10335                 <links>
10336                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10337                 </links>
10338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10339                         <actions>
10340                                 <retrieve/>
10341                         </actions>
10342                 </permacrud>
10343         </class>
10344
10345         <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">
10346                 <oils_persist:source_definition>
10347
10348             -- -- 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.
10349             -- -- 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
10350             -- -- may not.
10351             -- SELECT
10352             --     bre.id AS "bib_id",
10353             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10354             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10355             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10356             -- FROM (
10357                 SELECT
10358                     y.bre AS "id",
10359                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10360                     y.hold_count AS "hold_count",
10361                     (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"
10362                 FROM (
10363                         SELECT
10364                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10365                             COUNT(*) AS "hold_count"
10366                         FROM action.hold_request h
10367                         WHERE
10368                             cancel_time IS NULL
10369                             AND fulfillment_time IS NULL
10370                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10371                         GROUP BY 1
10372                     )y LEFT JOIN (
10373                         SELECT 
10374                             (SELECT id
10375                                 FROM biblio.record_entry 
10376                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10377                             ) AS "bre", 
10378                             COUNT(*) AS "copy_count"
10379                         FROM asset.copy
10380                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10381                         WHERE copy.holdable 
10382                             AND NOT copy.deleted 
10383                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10384                         GROUP BY 1
10385                     )x ON x.bre = y.bre
10386                 -- )z RIGHT JOIN (
10387                 --     SELECT id
10388                 --     FROM biblio.record_entry
10389                 --     WHERE NOT deleted
10390                 -- )bre ON (z.bib_id = bre.id)
10391                 
10392
10393                 </oils_persist:source_definition>
10394                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10395                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10396                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10397                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10398                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10399                 </fields>
10400                 <links>
10401                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10402                 </links>
10403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10404                         <actions>
10405                                 <retrieve/>
10406                         </actions>
10407                 </permacrud>
10408         </class>
10409
10410         <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">
10411                 <oils_persist:source_definition>
10412             SELECT *,
10413                 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,
10414                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10415             FROM
10416                 (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
10417                     FROM
10418                         action.hold_request ahr
10419                         JOIN reporter.hold_request_record rhrr USING (id)
10420                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10421                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10422                     WHERE
10423                         ahr.cancel_time IS NULL
10424                         AND ahr.fulfillment_time IS NULL
10425                     GROUP BY bib_record, pickup_lib
10426                 )x
10427                 JOIN
10428                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10429                     FROM
10430                         action.hold_request ahr
10431                         JOIN reporter.hold_request_record rhrr USING (id)
10432                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10433                     WHERE
10434                         ahr.cancel_time IS NULL
10435                         AND ahr.fulfillment_time IS NULL
10436                     GROUP BY bib_record
10437                 )y
10438                 USING (id)
10439                 </oils_persist:source_definition>
10440                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10441                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10442                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10443                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10444                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10445                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10446                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10447                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10448                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10449                 </fields>
10450                 <links>
10451                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10452                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10453                 </links>
10454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10455                         <actions>
10456                                 <retrieve/>
10457                         </actions>
10458                 </permacrud>
10459         </class>
10460
10461         <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">
10462                 <oils_persist:source_definition>
10463             SELECT
10464                 ac.id,
10465                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10466                 MAX(actac.xact_start) AS last_circ
10467             FROM asset.copy ac
10468                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10469             GROUP BY ac.id
10470
10471             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10472             --SELECT
10473             --    ac.id,
10474             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10475             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10476             --FROM asset.copy ac
10477             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10478             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10479             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10480                 </oils_persist:source_definition>
10481                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10482                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10483                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10484                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10485                 </fields>
10486                 <links>
10487                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10488                 </links>
10489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10490                         <actions>
10491                                 <retrieve/>
10492                         </actions>
10493                 </permacrud>
10494         </class>
10495
10496         <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">
10497                 <fields oils_persist:primary="id">
10498                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10499                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10500                 </fields>
10501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10502                         <actions>
10503                                 <retrieve/>
10504                         </actions>
10505                 </permacrud>
10506         </class>
10507
10508         <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">
10509                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10510                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10511                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10512                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10513                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10514                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10515                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10516                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10517                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10518                 </fields>
10519                 <links>
10520                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10521                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10522                 </links>
10523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10524                         <actions>
10525                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10526                                 <retrieve/>
10527                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10528                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10529                         </actions>
10530                 </permacrud>
10531         </class>
10532
10533         <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">
10534                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10535                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10536                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10537                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10538                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10539                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10540                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10541                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10542                 </fields>
10543                 <links>
10544                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10545                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10546                 </links>
10547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10548                         <actions>
10549                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10550                                 <retrieve/>
10551                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10552                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10553                         </actions>
10554                 </permacrud>
10555         </class>
10556
10557
10558         <!-- ********************************************************************************************************************* -->
10559         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10560         <!-- ********************************************************************************************************************* -->
10561         <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">
10562                 <fields oils_persist:primary="id">
10563                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10564                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10565                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10566                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10567                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10568                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10569                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10570                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10571                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10572                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10573                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10574                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10575                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10576                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10577                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10578                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10579                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10580                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10581                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10582                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10583                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10584                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10585                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10586                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10587                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10588                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10589                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10590                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10591                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10592                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10593                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10594                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10595                 </fields>
10596                 <links>
10597                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10598                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10599                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10600                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10601                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10602                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10603                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10604                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10605                 </links>
10606         </class>
10607
10608         <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">
10609                 <fields oils_persist:primary="id">
10610                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10611                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10612                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10613                 </fields>
10614                 <links>
10615                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10616                 </links>
10617         </class>
10618
10619         <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">
10620                 <fields oils_persist:primary="id">
10621                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10622                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10623                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10624                 </fields>
10625                 <links>
10626                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10627                 </links>
10628         </class>
10629
10630         <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">
10631                 <fields oils_persist:primary="id">
10632                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10633
10634                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10635                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10636                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10637
10638                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10639                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10640                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10641
10642                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10643                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10644
10645                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10646                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10647                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10648
10649                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10650                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10651
10652                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10653                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10654                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10655
10656                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10657                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10658                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10659
10660                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10661                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10662                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10663                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10664
10665                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10666                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10667
10668                 </fields>
10669                 <links>
10670                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10671                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10672                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10673                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10674                 </links>
10675         </class>
10676
10677         <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">
10678                 <oils_persist:source_definition>
10679
10680             SELECT
10681                 po.ordering_agency AS ordering_agency,
10682                 po.id AS purchase_order,
10683                 li.id AS lineitem,
10684                 lid.id AS lineitem_detail,
10685                 cpa.id AS claim_policy_action
10686             FROM
10687                 acq.lineitem_detail lid
10688                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10689                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10690                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10691                 JOIN acq.claim_policy_action cpa ON (
10692                     cpa.claim_policy = cp.id
10693
10694                     -- we only care about claim policy actions whose claim
10695                     -- interval we'd reached or exceeded
10696                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10697
10698                     -- filter out all claim policy actions where claim events
10699                     -- have occurred on or after the action's action_interval
10700                     AND NOT EXISTS (
10701                         SELECT 1
10702                         FROM
10703                             acq.claim_event evt
10704                             JOIN acq.claim claim ON (
10705                                 claim.id = evt.claim
10706                                 AND claim.lineitem_detail = lid.id
10707                             )
10708                         WHERE
10709                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10710                     )
10711                 )
10712             WHERE
10713                 lid.cancel_reason IS NULL
10714                 AND li.cancel_reason IS NULL -- belt/suspenders
10715                 AND po.cancel_reason IS NULL -- belt/suspenders
10716                 AND lid.recv_time IS NULL
10717                 AND po.state = 'on-order'
10718             ORDER BY 1, 2, 3, 4, 5
10719
10720                 </oils_persist:source_definition>
10721                 <fields>
10722                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10723                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10724                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10725                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10726                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10727                 </fields>
10728                 <links>
10729                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10730                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10731                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10732                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10733                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10734                 </links>
10735         </class>
10736         <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">
10737                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10738                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10739                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10740                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10741                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10742                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10743                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10744                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10745                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10746                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10747                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10748                 </fields>
10749                 <links>
10750                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10751                 </links>
10752     </class>
10753         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10754                 <oils_persist:source_definition>
10755             SELECT * FROM acq.lineitem_summary 
10756                                 WHERE item_count > (invoice_count + cancel_count)
10757         </oils_persist:source_definition>
10758                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10759                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10760                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10761                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10762                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10763                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10764                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10765                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10766                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10767                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10768                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10769                 </fields>
10770                 <links>
10771                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10772                 </links>
10773     </class>
10774         <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">
10775                 <oils_persist:source_definition>
10776
10777                         SELECT  t.*
10778                           FROM  action.transit_copy t
10779                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10780                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10781                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10782
10783                 </oils_persist:source_definition>
10784                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10785                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10786                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10787                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10788                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10789                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10790                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10791                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10792                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10793                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10794                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10795                 </fields>
10796                 <links>
10797                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10798                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10799                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10800                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10801                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10802                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10803                 </links>
10804         </class>
10805
10806     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10807                 <oils_persist:source_definition>
10808
10809         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10810                 SELECT
10811                         cp.id as copy,
10812                         COUNT(circ.id),
10813                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10814                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10815                 FROM
10816                         asset.copy cp
10817                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10818                 GROUP BY 1, 3, 4
10819                 UNION ALL
10820                 SELECT
10821                         cp.id as copy,
10822                         COUNT(circ.id),
10823                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10824                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10825                 FROM
10826                         asset.copy cp
10827                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10828                 GROUP BY 1, 3, 4
10829                 UNION ALL
10830                 SELECT
10831                         id as copy,
10832                         circ_count,
10833                         -1 AS year,
10834                         false as is_renewal
10835                 FROM
10836                         extend_reporter.legacy_circ_count
10837         )x GROUP BY 1, 3, 4
10838
10839                 </oils_persist:source_definition>
10840         <fields>
10841             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10842             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10843             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10844             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10845         </fields>
10846                 <links>
10847                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10848                 </links>
10849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10850                         <actions>
10851                                 <retrieve/>
10852                         </actions>
10853                 </permacrud>
10854     </class>
10855
10856         <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">
10857                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10858                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10859                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10860                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10861                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10862                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10863                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10864                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10865                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10866                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10867                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10868                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10869                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10870                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10871                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10872                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10873                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10874                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10875                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10876                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10877                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10878                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10879                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10880                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10881                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10882                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10883                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10884                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10885                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10886                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10887                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10888                 </fields>
10889                 <links>
10890                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10891                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10892                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10893                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10894                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10895                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10896                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10897                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10898                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10899                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10900                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10901                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10902                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10903                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10904                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10905                 </links>
10906         </class>
10907
10908     <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">
10909         <fields oils_persist:primary="id">
10910             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10911             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10912             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10913             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10914             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10915             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10916             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10917             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10918             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10919             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10920             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10921             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10922             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
10923             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
10924             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10925             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10926             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10927             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10928             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10929             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10930             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10931             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10932             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10933             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10934             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10935             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10936             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10937             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10938             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10939             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10940             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10941             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10942             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10943             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10944         </fields>
10945         <links>
10946             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10947             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10948             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10949             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10950             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10951             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10952             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
10953             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
10954         </links>
10955     </class>
10956
10957     <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">
10958         <fields oils_persist:primary="id">
10959             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10960             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10961             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10962             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10963         </fields>
10964         <links>
10965             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10966             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10967         </links>
10968     </class>
10969
10970     <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">
10971         <fields oils_persist:primary="owning_lib">
10972             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10973             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10974             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10975         </fields>
10976         <links>
10977             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10978         </links>
10979     </class>
10980
10981     <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">
10982         <fields oils_persist:primary="id">
10983             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10984             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10985             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10986             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10987             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10988         </fields>
10989         <links>
10990             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10991             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10992             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10993         </links>
10994     </class>
10995
10996     <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">
10997         <fields oils_persist:primary="circ_lib">
10998             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10999             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11000             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11001             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11002         </fields>
11003         <links>
11004             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11005             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11006         </links>
11007     </class>
11008
11009     <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">
11010         <fields oils_persist:primary="id">
11011             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11012             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11013             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11014             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11015             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11016         </fields>
11017         <links>
11018             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11019             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11020             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11021         </links>
11022     </class>
11023
11024     <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">
11025         <fields oils_persist:primary="home_ou">
11026             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11027             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11028             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11029             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11030         </fields>
11031         <links>
11032             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11033             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11034         </links>
11035     </class>
11036         <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">
11037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11038                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11039                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11040                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11041                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11042                 </fields>
11043                 <links>
11044                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11045                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11046                 </links>
11047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11048                         <actions>
11049                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11050                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11051                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11052                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11053                         </actions>
11054                 </permacrud>
11055         </class>
11056         <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">
11057                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11058                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11059                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11060                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11061                 </fields>
11062                 <links>
11063                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11064                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11065                         </links>
11066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11067                 <actions>
11068                                 <create permission="ADMIN_ACQ_FUND_TAG">
11069                                         <context link="tag" field="owner"/>
11070                                 </create>
11071                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11072                                         <context link="tag" field="owner"/>
11073                                 </retrieve>
11074                                 <update permission="ADMIN_ACQ_FUND_TAG">
11075                                         <context link="tag" field="owner"/>
11076                                 </update>
11077                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11078                                         <context link="tag" field="owner"/>
11079                                 </delete>
11080                         </actions>
11081                 </permacrud>
11082         </class>
11083         <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">
11084                 <oils_persist:source_definition><![CDATA[
11085                 SELECT
11086                         poi.purchase_order AS purchase_order,
11087                         ii.invoice AS invoice,
11088                         NULL AS lineitem,
11089                         poi.id AS po_item,
11090                         NULL AS picklist
11091                 FROM
11092                         acq.po_item poi
11093                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11094                 UNION SELECT
11095                         jub.purchase_order AS purchase_order,
11096                         ie.invoice AS invoice,
11097                         jub.id AS lineitem,
11098                         NULL AS po_item,
11099                         jub.picklist AS picklist
11100                 FROM
11101                         acq.lineitem jub
11102                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11103                 UNION SELECT
11104                         ii.purchase_order AS purchase_order,
11105                         ii.invoice AS invoice,
11106                         NULL AS lineitem,
11107                         NULL AS po_item,
11108                         NULL AS picklist
11109                 FROM
11110                         acq.invoice_item ii
11111                 WHERE ii.po_item IS NULL
11112                 UNION SELECT
11113                         ie.purchase_order AS purchase_order,
11114                         ie.invoice AS invoice,
11115                         NULL AS lineitem,
11116                         NULL AS po_item,
11117                         NULL AS picklist
11118                 FROM
11119                         acq.invoice_entry ie
11120                 WHERE ie.lineitem IS NULL
11121                 UNION SELECT
11122                         NULL AS purchase_order,
11123                         NULL AS invoice,
11124                         jub.id AS lineitem,
11125                         NULL AS po_item,
11126                         jub.picklist AS picklist
11127                 FROM
11128                         acq.lineitem jub
11129                 WHERE jub.purchase_order IS NULL
11130                 ]]></oils_persist:source_definition>
11131                 <fields>
11132                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11133                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11134                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11135                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11136                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11137                 </fields>
11138                 <links>
11139                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11140                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11141                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11142                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11143                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11144                 </links>
11145         </class>
11146         <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">
11147                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11148                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11149                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11150                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11151                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11152                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11153                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11154                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11155                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11156                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11157                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11158                 </fields>
11159                 <links>
11160                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11161                 </links>
11162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11163                         <actions>
11164                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11165                                 <retrieve/>
11166                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11167                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11168                         </actions>
11169                 </permacrud>
11170         </class>
11171
11172         <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">
11173                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11174                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11175                         <field name="date_applied" reporter:datatype="timestamp"/>
11176                         <field name="org" reporter:datatype="org_unit"/>
11177                         <field name="original_value" reporter:datatype="text"/>
11178                         <field name="new_value" reporter:datatype="text"/>
11179                         <field name="field_name" reporter:datatype="link"/>
11180                 </fields>
11181                 <links>
11182                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11183                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11184                 </links>
11185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11186                         <actions>
11187                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11188                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11189                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11190                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11191                         </actions>
11192                 </permacrud>
11193         </class>
11194         <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">
11195                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11196                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11197                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11198                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11199                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11200                 </fields>
11201                 <links>
11202                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11203                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11204                 </links>
11205         </class>
11206         <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">
11207                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11208                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11209                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11210                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11211                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11212                 </fields>
11213                 <links>
11214                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11215                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11216                 </links>
11217         </class>
11218         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
11219                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11221                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11222                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11223                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11224                 </fields>
11225                 <links>
11226                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11227                 </links>
11228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11229                         <actions>
11230                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11231                                 <retrieve/>
11232                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11233                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11234                         </actions>
11235                 </permacrud>
11236         </class>
11237         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11238                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11239                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11240                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11241                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11242                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11243                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11244                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11245                 </fields>
11246                 <links>
11247                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11248                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11249                 </links>
11250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11251                         <actions>
11252                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11253                                 <retrieve/>
11254                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11255                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11256                         </actions>
11257                 </permacrud>
11258         </class>
11259
11260         <!-- ********************************************************************************************************************* -->
11261
11262 </IDL>
11263
11264 <!--
11265     vim:noet:ts=4:sw=4:
11266 -->