]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1440114 Direct charge blanket orders
[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                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1441                 </fields>
1442                 <links/>
1443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1444             <actions>
1445                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1446                 <retrieve/>
1447                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1448                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1449             </actions>
1450         </permacrud>
1451         </class>
1452
1453         <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">
1454                 <fields oils_persist:primary="code">
1455                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1456                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1457                 </fields>
1458                 <links/>
1459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1460             <actions>
1461                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1462                 <retrieve/>
1463                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1464                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1465             </actions>
1466         </permacrud>
1467         </class>
1468
1469         <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">
1470                 <fields oils_persist:primary="code">
1471                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1472                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1473                 </fields>
1474                 <links/>
1475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1476             <actions>
1477                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1478                 <retrieve/>
1479                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1480                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1481             </actions>
1482         </permacrud>
1483         </class>
1484
1485         <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">
1486                 <fields oils_persist:primary="code">
1487                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1488                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1489                 </fields>
1490                 <links/>
1491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1492             <actions>
1493                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1494                 <retrieve/>
1495                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1496                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1497             </actions>
1498         </permacrud>
1499         </class>
1500
1501         <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">
1502                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1503                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1504                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1505                 </fields>
1506                 <links/>
1507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1508             <actions>
1509                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1510                 <retrieve/>
1511                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1512                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1513             </actions>
1514         </permacrud>
1515         </class>
1516
1517         <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">
1518                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1519                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1520                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1521                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1522                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1523                 </fields>
1524         <links>
1525             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1526             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1527             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1528         </links>
1529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1530             <actions>
1531                 <create permission="UPDATE_COPY">
1532                     <context link="target_copy" field="circ_lib"/>
1533                 </create>
1534                 <retrieve/>
1535                 <update permission="UPDATE_COPY">
1536                     <context link="target_copy" field="circ_lib"/>
1537                 </update>
1538                 <delete permission="UPDATE_COPY">
1539                     <context link="target_copy" field="circ_lib"/>
1540                 </delete>
1541             </actions>
1542         </permacrud>
1543         </class>
1544
1545         <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">
1546                 <fields oils_persist:primary="code">
1547                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1548                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1549                 </fields>
1550                 <links/>
1551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1552             <actions>
1553                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1554                 <retrieve/>
1555                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1556                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1557             </actions>
1558         </permacrud>
1559         </class>
1560
1561         <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">
1562                 <fields oils_persist:primary="code">
1563                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1564                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1565                 </fields>
1566                 <links/>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1570                 <retrieve/>
1571                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1572                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1573             </actions>
1574         </permacrud>
1575         </class>
1576
1577         <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">
1578                 <fields oils_persist:primary="code">
1579                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1580                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1581                 </fields>
1582                 <links/>
1583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1584             <actions>
1585                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1586                 <retrieve/>
1587                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1588                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1589             </actions>
1590         </permacrud>
1591         </class>
1592
1593     <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">
1594         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1595             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1596             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1597             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1598             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1599             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1600             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1601             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1602             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1603             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1604             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1605             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1606             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1607             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1608             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1609             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1610             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1611             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1612         </fields>
1613         <links/>
1614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1615             <actions>
1616                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1617                 <retrieve/>
1618                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1619                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1620             </actions>
1621         </permacrud>
1622     </class>
1623
1624     <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">
1625         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1626             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1627             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1628             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1629             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1630             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1631             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1632             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1633             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1634             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1635             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1636             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1637             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1638             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1639             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1640             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1641             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1642             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1643             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1644             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1645         </fields>
1646         <links/>
1647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1648             <actions>
1649                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1650                 <retrieve/>
1651                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1652                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1653             </actions>
1654         </permacrud>
1655     </class>
1656
1657     <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">
1658         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1659             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1660             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1661             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1662             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1663             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1664         </fields>
1665         <links>
1666             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1667             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1668             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1669         </links>
1670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1671             <actions>
1672                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1673                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1674                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1675                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1676             </actions>
1677         </permacrud>
1678     </class>
1679
1680         <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">
1681                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1682                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1683                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1684                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1685                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1686                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1687                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1688                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1689                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1690                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1691                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1692                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1693                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1694                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1695                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1696                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1697                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1698             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1699                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1700                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1701                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1702                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1703                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1704                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1705                 </fields>
1706                 <links>
1707                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1708                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1709                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1710                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1711                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1712                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1713                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1714                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1715                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1716                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1717                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1718                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1719                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1720             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1721                 </links>
1722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1723             <actions>
1724                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1725                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1726                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1727                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1728             </actions>
1729         </permacrud>
1730         </class>
1731
1732         <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">
1733                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1734                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1735                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1736                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1737                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1738                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1739                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1740                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1741                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1742                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1743                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1744                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1745                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1746                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1747                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1748                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1749             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1750                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1751                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1752             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1753                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1754                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1755                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1756                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1757             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1758             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1759             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1760                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1761                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1762                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1763                 </fields>
1764                 <links>
1765                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1766                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1767                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1768                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1769                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1770                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1771                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1772                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1773                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1774                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1775                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1776                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1777                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1778                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1779             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1780                 </links>
1781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1782             <actions>
1783                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1784                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1785                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1786                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1787             </actions>
1788         </permacrud>
1789         </class>
1790
1791     <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">
1792         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1793             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1794             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1795             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1796         </fields>
1797         <links/>
1798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1799             <actions>
1800                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1801                 <retrieve/>
1802                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1803                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1804             </actions>
1805         </permacrud>
1806     </class>
1807
1808     <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">
1809         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1810             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1811             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1812             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1813             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1814             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1815             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1816             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1817         </fields>
1818         <links>
1819             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1820         </links>
1821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1822             <actions>
1823                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1824                 <retrieve/>
1825                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1826                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1827             </actions>
1828         </permacrud>
1829     </class>
1830
1831     <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">
1832         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1833             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1834             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1835             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1836             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1837             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1838         </fields>
1839         <links>
1840             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1841             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1842         </links>
1843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1844             <actions>
1845                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1846                     <context link="matchpoint" field="org_unit"/>
1847                 </create>
1848                 <retrieve/>
1849                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1850                     <context link="matchpoint" field="org_unit"/>
1851                 </update>
1852                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1853                     <context link="matchpoint" field="org_unit"/>
1854                 </delete>
1855             </actions>
1856         </permacrud>
1857     </class>
1858
1859     <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">
1860         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1861             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1862             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1863             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1864         </fields>
1865         <links>
1866             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1867             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1868         </links>
1869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1870             <actions>
1871                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1872                     <context link="limit_set" field="owning_lib"/>
1873                 </create>
1874                 <retrieve/>
1875                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1876                     <context link="limit_set" field="owning_lib"/>
1877                 </update>
1878                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1879                     <context link="limit_set" field="owning_lib"/>
1880                 </delete>
1881             </actions>
1882         </permacrud>
1883     </class>
1884     <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">
1885         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1886             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1887             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1888             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1889         </fields>
1890         <links>
1891             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1892             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1893         </links>
1894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1895             <actions>
1896                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1897                     <context link="limit_set" field="owning_lib"/>
1898                 </create>
1899                 <retrieve/>
1900                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1901                     <context link="limit_set" field="owning_lib"/>
1902                 </update>
1903                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1904                     <context link="limit_set" field="owning_lib"/>
1905                 </delete>
1906             </actions>
1907         </permacrud>
1908     </class>
1909
1910     <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">
1911         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1912             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1913             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1914             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1915             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1916         </fields>
1917         <links>
1918             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1919             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1920         </links>
1921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1922             <actions>
1923                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1924                     <context link="limit_set" field="owning_lib"/>
1925                 </create>
1926                 <retrieve/>
1927                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1928                     <context link="limit_set" field="owning_lib"/>
1929                 </update>
1930                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1931                     <context link="limit_set" field="owning_lib"/>
1932                 </delete>
1933             </actions>
1934         </permacrud>
1935     </class>
1936
1937         <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">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1939                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1940                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1941                 </fields>
1942                 <links/>
1943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1944             <actions>
1945                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1946                 <retrieve/>
1947                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1948                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1949             </actions>
1950         </permacrud>
1951         </class>
1952
1953         <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">
1954                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1955                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1956                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1957                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1958                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1959                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1960                 </fields>
1961                 <links>
1962                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1963                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1964                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1965                 </links>
1966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1967             <actions>
1968                 <create permission="ADMIN_SURVEY">
1969                     <context link="survey" field="owner"/>
1970                 </create>
1971                 <retrieve/>
1972                 <update permission="ADMIN_SURVEY">
1973                     <context link="survey" field="owner"/>
1974                 </update>
1975                 <delete permission="ADMIN_SURVEY">
1976                     <context link="survey" field="owner"/>
1977                 </delete>
1978             </actions>
1979         </permacrud>
1980         </class>
1981         <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">
1982                 <fields oils_persist:primary="id" oils_persist:sequence="">
1983                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1984                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1985                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1986                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1987                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1988                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1989                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1990                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1991                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1992                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1993                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1994                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1995                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1996                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1997                 </fields>
1998                 <links>
1999                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2000                 </links>
2001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2002                         <actions>
2003                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2004                                         <context link="usr" field="home_ou" />
2005                                 </retrieve>
2006                         </actions>
2007                 </permacrud>
2008         </class>
2009         <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">
2010                 <fields oils_persist:primary="id" oils_persist:sequence="">
2011                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2012                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2013                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2014                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2015                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2016                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2017                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2018                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2019                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2020                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2021                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2022                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2023                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2024                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2025                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2026                 </fields>
2027                 <links>
2028                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2029                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2030                 </links>
2031         </class>
2032         <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">
2033                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2034                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2035                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2036                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2037                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2038                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2039                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2040                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2041                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2042                 </fields>
2043                 <links>
2044                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2045                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2046                 </links>
2047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2048                         <actions> <!-- created magically, so no create action -->
2049                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2050                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2051                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2052                         </actions>
2053                 </permacrud>
2054         </class>
2055         <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)">
2056                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2057                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2058                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2059                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2060                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2061                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2062                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2063                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2064                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2065                 </fields>
2066                 <links>
2067                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2068                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2069                 </links>
2070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2071                         <actions> <!-- created magically, so no create action -->
2072                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2073                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2074                         </actions>
2075                 </permacrud>
2076         </class>
2077         <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">
2078                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2079                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2080                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2081                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2082                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2083                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2084                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2085                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2086                 </fields>
2087                 <links>
2088                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2089                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2090                 </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="UPDATE_USER" context_field="owner">
2094                     <context link="usr" field="home_ou"/>
2095                 </create>
2096                                 <!-- note: public notes are still accessible via API -->
2097                 <retrieve permission="UPDATE_USER">
2098                     <context link="usr" field="home_ou"/>
2099                                 </retrieve>
2100                 <update permission="UPDATE_USER">
2101                     <context link="usr" field="home_ou"/>
2102                                 </update>
2103                 <delete permission="UPDATE_USER">
2104                     <context link="usr" field="home_ou"/>
2105                                 </delete>
2106             </actions>
2107         </permacrud>
2108         </class>
2109         <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">
2110                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2111                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2112                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2113                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2114                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2115                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2116                 </fields>
2117                 <links>
2118                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2119                 </links>
2120         </class>
2121         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2122                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2123                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2124                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2125                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2126                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2127                 </fields>
2128                 <links>
2129                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2130                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2131                 </links>
2132         </class>
2133         <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">
2134                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2135                         <field name="field" reporter:datatype="link"/>
2136                         <field name="id" reporter:datatype="id" />
2137                         <field name="source" reporter:datatype="link"/>
2138                         <field name="value" reporter:datatype="text"/>
2139                 </fields>
2140                 <links>
2141                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2142                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2143                 </links>
2144         </class>
2145         <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">
2146                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2147                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2148                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2149                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2150                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2151                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2152                 </fields>
2153                 <links>
2154                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2155                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2156                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2157                 </links>
2158         </class>
2159         <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">
2160                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2161                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2162                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2163                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2164                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2165                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2166                 </fields>
2167                 <links>
2168                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2169                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2170                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2171                 </links>
2172         </class>
2173         <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">
2174                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2175                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2176                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2177                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2178                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2179                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2180                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2181                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2182                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2183                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2184                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2185                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2186                 </fields>
2187                 <links>
2188                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2189                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2190                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2191                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2192                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2193                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2194                 </links>
2195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2196             <actions>
2197                 <create permission="TRANSIT_COPY" context_field="owner">
2198                     <context link="target_copy" field="circ_lib"/>
2199                 </create>
2200                 <retrieve/>
2201                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2202                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2203             </actions>
2204         </permacrud>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2208                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2209                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2210                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2211                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2212                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2213                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2214                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2215                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2216                 </fields>
2217                 <links>
2218                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2219                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2220                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2221                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2222                 </links>
2223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2224             <actions>
2225                 <create permission="ADMIN_SURVEY">
2226                     <context link="survey" field="owner"/>
2227                 </create>
2228                 <retrieve/>
2229                 <update permission="ADMIN_SURVEY">
2230                     <context link="survey" field="owner"/>
2231                 </update>
2232                 <delete permission="ADMIN_SURVEY">
2233                     <context link="survey" field="owner"/>
2234                 </delete>
2235             </actions>
2236         </permacrud>
2237         </class>
2238         <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">
2239                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2240                         <field name="bucket" />
2241                         <field name="id" reporter:datatype="id" />
2242                         <field name="target_copy" reporter:datatype="link"/>
2243                         <field name="create_time" reporter:datatype="timestamp" />
2244                         <field name="pos" reporter:datatype="int" />
2245                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2246                 </fields>
2247                 <links>
2248                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2249                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2250             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2251                 </links>
2252         </class>
2253         <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">
2254                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2255                         <field name="id" reporter:datatype="id" />
2256                         <field name="item" reporter:datatype="link"/>
2257                         <field name="note" reporter:datatype="text" />
2258                 </fields>
2259                 <links>
2260                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2261                 </links>
2262         </class>
2263
2264         <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">
2265                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2266                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2267                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2268                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2269                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2270                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2271                 </fields>
2272                 <links>
2273                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2274                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2275                 </links>
2276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2277                         <actions>
2278                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2279                                 <retrieve/>
2280                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2281                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2282                         </actions>
2283                 </permacrud>
2284         </class>
2285
2286         <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">
2287                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2288                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2289                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2290                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2291                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2292                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2293                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2294                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2295                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2296                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2297                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2298                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2299                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2300                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2301                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2302                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2303                 </fields>
2304                 <links>
2305                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2306                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2307                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2308                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2309                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2310                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2311                 </links>
2312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2313                         <actions>
2314                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2315                                 <retrieve/>
2316                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2317                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2318                         </actions>
2319                 </permacrud>
2320         </class>
2321
2322         <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">
2323                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2324                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2325                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2326                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2327                 </fields>
2328                 <links>
2329                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2330                 </links>
2331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2332                         <actions>
2333                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2334                                 <retrieve/>
2335                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2336                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2337                         </actions>
2338                 </permacrud>
2339         </class>
2340
2341         <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">
2342                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2344                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2345                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2346                 </fields>
2347                 <links>
2348                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2349                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2350                 </links>
2351                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2352                         <actions>
2353                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2354                                 <retrieve/>
2355                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2356                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2357                         </actions>
2358                 </permacrud>
2359         </class>
2360
2361         <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">
2362                 <fields oils_persist:primary="code">
2363                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2364                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2365                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2366                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2367                 </fields>
2368                 <links>
2369                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2370                 </links>
2371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2372                         <actions>
2373                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2374                                 <retrieve/>
2375                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2376                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2377                         </actions>
2378                 </permacrud>
2379         </class>
2380
2381         <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">
2382                 <fields oils_persist:primary="code">
2383                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2384                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2385                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2386                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2387                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2388                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2389                 </fields>
2390                 <links>
2391                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2392                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2393                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2394                 </links>
2395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2396                         <actions>
2397                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2398                                 <retrieve/>
2399                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2400                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2401                         </actions>
2402                 </permacrud>
2403         </class>
2404
2405     <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">
2406         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2407             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2408             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2409             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2410         </fields>
2411         <links>
2412             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2413             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2414         </links>
2415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2416             <actions>
2417                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2418                 <retrieve/>
2419                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2420                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2421             </actions>
2422         </permacrud>
2423     </class>
2424
2425         <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">
2426                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2427                         <field name="active" reporter:datatype="bool"/>
2428                         <field name="create_date" reporter:datatype="timestamp"/>
2429                         <field name="creator" />
2430                         <field name="deleted" reporter:datatype="bool"/>
2431                         <field name="edit_date" reporter:datatype="timestamp"/>
2432                         <field name="editor" />
2433                         <field name="id" reporter:datatype="id" />
2434                         <field name="last_xact_id" />
2435                         <field name="marc" />
2436                         <field name="source" />
2437                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2438                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2439                         <field name="heading" />
2440                         <field name="simple_heading" />
2441                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2442                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2443                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2444                 </fields>
2445                 <links>
2446                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2448                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2449                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2450                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2451                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2452                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2453                 </links>
2454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2455                         <actions>
2456                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2457                                 <retrieve/>
2458                                 <update permission="UPDATE_MARC" global_required="true"/>
2459                                 <delete permission="UPDATE_MARC" global_required="true"/>
2460                         </actions>
2461                 </permacrud>
2462         </class>
2463         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2464                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2465                         <field name="char_encoding" />
2466                         <field name="id" />
2467                         <field name="record" />
2468                         <field name="record_status" />
2469                         <field name="thesaurus" />
2470                 </fields>
2471                 <links>
2472                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2473                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2474                 </links>
2475         </class>
2476         <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">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2478                         <field name="id" reporter:datatype="id" />
2479                         <field name="bib" reporter:datatype="link" />
2480                         <field name="authority" reporter:datatype="link" />
2481                 </fields>
2482                 <links>
2483                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2484                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2485                 </links>
2486         </class>
2487         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2488                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2489                         <field name="id" reporter:datatype="id" />
2490                         <field name="record" reporter:datatype="link" />
2491                         <field name="atag" reporter:datatype="link" />
2492                         <field name="value" reporter:datatype="text" />
2493                 </fields>
2494                 <links>
2495                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2496                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2497                 </links>
2498         </class>
2499         <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">
2500                 <fields oils_persist:primary="code" oils_persist:sequence="">
2501                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2502                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2503                 </fields>
2504                 <links/>
2505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2506             <actions>
2507                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2508                 <retrieve/>
2509                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2510                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2511             </actions>
2512         </permacrud>
2513         </class>
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2516                         <field name="accepting_usr" />
2517                         <field name="amount" reporter:datatype="money" />
2518                         <field name="amount_collected" reporter:datatype="money" />
2519                         <field name="approval_code" reporter:datatype="text"/>
2520                         <field name="cash_drawer" reporter:datatype="link"/>
2521                         <field name="cc_first_name" reporter:datatype="text"/>
2522                         <field name="cc_last_name" reporter:datatype="text"/>
2523                         <field name="cc_number" reporter:datatype="text"/>
2524                         <field name="cc_order_number" reporter:datatype="text"/>
2525                         <field name="cc_type" reporter:datatype="text"/>
2526                         <field name="cc_processor" reporter:datatype="text"/>
2527                         <field name="expire_month" reporter:datatype="int" />
2528                         <field name="expire_year" reporter:datatype="int" />
2529                         <field name="id" reporter:datatype="id" />
2530                         <field name="note" reporter:datatype="text"/>
2531                         <field name="payment_ts" reporter:datatype="timestamp"/>
2532                         <field name="xact" reporter:datatype="link"/>
2533                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2534                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2535                 </fields>
2536                 <links>
2537                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2538                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2539                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2540                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2541                 </links>
2542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2543             <actions>
2544                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2545                     <context link="xact" jump="usr" field="home_ou"/>
2546                 </retrieve>
2547                         </actions>
2548                 </permacrud>
2549         </class>
2550         <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">
2551                 <fields oils_persist:primary="name">
2552                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2553                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2554                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2555                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2556                 </fields>
2557                 <links/>
2558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2559             <actions>
2560                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2561                 <retrieve/>
2562                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2563                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2564             </actions>
2565         </permacrud>
2566         </class>
2567
2568         <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">
2569                 <fields oils_persist:primary="alias">
2570                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2571                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2572                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2573                 </fields>
2574                 <links>
2575                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2576                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2577                 </links>
2578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579             <actions>
2580                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2581                 <retrieve/>
2582                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2583                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2584             </actions>
2585         </permacrud>
2586         </class>
2587
2588         <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">
2589                 <fields oils_persist:primary="name">
2590                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2591                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2592                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2593                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2594                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2595                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2596                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2597                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2598                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2599                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2600                 </fields>
2601                 <links>
2602                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2603                 </links>
2604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2605             <actions>
2606                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2607                 <retrieve/>
2608                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2609                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2610             </actions>
2611         </permacrud>
2612         </class>
2613
2614         <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">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2616                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2617                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2618                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2619                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2620                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2621                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2622                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2623                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2624                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2625                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2626                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2627                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2628                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2629                 </fields>
2630                 <links>
2631                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2632                 </links>
2633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2634             <actions>
2635                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2636                 <retrieve/>
2637                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2638                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2639             </actions>
2640         </permacrud>
2641         </class>
2642         <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">
2643                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2644                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2645                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2646                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2647                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2648                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2649                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2650                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2651                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2652                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2653                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2654                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2655                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2656                 </fields>
2657                 <links>
2658                 </links>
2659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2660                         <actions>
2661                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2662                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2663                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2664                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2665                         </actions>
2666                 </permacrud>
2667         </class>
2668         <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">
2669                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2670                         <field name="id" reporter:datatype="id" />
2671                         <field name="name" reporter:datatype="text"/>
2672                         <field name="xpath" reporter:datatype="text"/>
2673                         <field name="format" reporter:datatype="link"/>
2674                         <field name="first_word" reporter:datatype="bool" />
2675                 </fields>
2676                 <links/>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2682                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686         <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">
2687                 <fields oils_persist:primary="code" oils_persist:sequence="">
2688                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2689                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2690                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2691                 </fields>
2692                 <links/>
2693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2694             <actions>
2695                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2696                 <retrieve/>
2697                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2698                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2699             </actions>
2700         </permacrud>
2701         </class>
2702         <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">
2703                 <fields oils_persist:primary="code" oils_persist:sequence="">
2704                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2705                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2706                 </fields>
2707                 <links/>
2708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709             <actions>
2710                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2711                 <retrieve/>
2712                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2713                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2714             </actions>
2715         </permacrud>
2716         </class>
2717     <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">
2718         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2719             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2720             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2721             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2722             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2723         </fields>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <retrieve/>
2727             </actions>
2728         </permacrud>
2729     </class>
2730         <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">
2731                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2732                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2733                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2734                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2735                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2736                 </fields>
2737                 <links>
2738                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2739                 </links>
2740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2741             <actions>
2742                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2743                 <retrieve/>
2744                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2745                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2746             </actions>
2747         </permacrud>
2748         </class>
2749         <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">
2750                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2751                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2752                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2753                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2754                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2755                 </fields>
2756                 <links>
2757                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2758                 </links>
2759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2760             <actions>
2761                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2762                 <retrieve/>
2763                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2764                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2765             </actions>
2766         </permacrud>
2767         </class>
2768         <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">
2769                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2770                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2771                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2772                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2773                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2774                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2775                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2776                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2777                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2778                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2779                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2780                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2782                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2783                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2784                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2785                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2786                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2790                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2791                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2792                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2793                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2794                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2795                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2796                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2797                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2798                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2799                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2800                 </links>
2801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2802             <actions>
2803                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2804                 <retrieve/>
2805                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2806                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2807             </actions>
2808         </permacrud>
2809         </class>
2810         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2811                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2812                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2813                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2814                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2815                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2816                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2817                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2818                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2819                 </fields>
2820                 <links>
2821                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2822                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2823         </links>
2824         </class>
2825         <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">
2826                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2827                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2828                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2829                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2830                 </fields>
2831                 <links>
2832                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2833                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2834                 </links>
2835         </class>
2836         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2837                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2838                         <field name="id" reporter:datatype="id" />
2839                         <field name="value" oils_persist:i18n="true" />
2840                 </fields>
2841                 <links/>
2842         </class>
2843         <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">
2844                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2845                         <field name="balance_owed" reporter:datatype="money" />
2846                         <field name="total_owed" reporter:datatype="money" />
2847                         <field name="total_paid" reporter:datatype="money" />
2848                         <field name="usr" reporter:datatype="link"/>
2849                 </fields>
2850                 <links>
2851                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2852         </links>
2853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2854             <actions>
2855                 <retrieve permission="VIEW_USER">
2856                     <context link="usr" field="home_ou"/>
2857                 </retrieve>
2858             </actions>
2859         </permacrud>
2860         </class>
2861         <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">
2862                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2863                         <field name="collector" />
2864                         <field name="enter_time" reporter:datatype="timestamp"/>
2865                         <field name="id" reporter:datatype="id" />
2866                         <field name="location" reporter:datatype="link"/>
2867                         <field name="usr" reporter:datatype="link"/>
2868                 </fields>
2869                 <links>
2870                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2871                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2872                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="money.collections_tracker.create" context_field="location"/>
2877                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2878                 <delete permission="money.collections_tracker.create" context_field="location"/>
2879             </actions>
2880         </permacrud>
2881         </class>
2882         <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">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2884                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2885                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2886                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2887                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2888                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2889                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2890                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2891                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2892                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2893                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2894                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2895                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2896                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2897                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2898                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2899                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2900                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2901                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2902                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2903                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2904                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2905                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2906                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2907                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2908                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2910                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2911                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2912                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2913                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2914                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2915                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2916                 </fields>
2917                 <links>
2918                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2919                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2920                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2921                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2922                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2923                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2924                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2925                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2926                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2927                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2928                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2929                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2930                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2931                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2932                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2933                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2934                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2935                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2936                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2937                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2938                 </links>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2942                 <retrieve/>
2943                 <update permission="UPDATE_MARC" global_required="true"/>
2944                 <!-- 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. -->
2945                 <delete permission="DELETE_RECORD" global_required="true"/>
2946             </actions>
2947         </permacrud>
2948         </class>
2949         <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">
2950                 <fields oils_persist:primary="id">
2951                         <field name="dow_0_close" />
2952                         <field name="dow_0_open" />
2953                         <field name="dow_1_close" />
2954                         <field name="dow_1_open" />
2955                         <field name="dow_2_close" />
2956                         <field name="dow_2_open" />
2957                         <field name="dow_3_close" />
2958                         <field name="dow_3_open" />
2959                         <field name="dow_4_close" />
2960                         <field name="dow_4_open" />
2961                         <field name="dow_5_close" />
2962                         <field name="dow_5_open" />
2963                         <field name="dow_6_close" />
2964                         <field name="dow_6_open" />
2965                         <field name="id" reporter:datatype="id" />
2966                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2967                 </fields>
2968                 <links>
2969                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2970                 </links>
2971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2972             <actions>
2973                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2974                 <retrieve/>
2975                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2976                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2977             </actions>
2978         </permacrud>
2979         </class>
2980         <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">
2981                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2982                         <field name="id" reporter:datatype="id" />
2983                         <field name="record" reporter:datatype="link"/>
2984                         <field name="label" reporter:datatype="text"/>
2985                         <field name="label_sortkey" reporter:datatype="text"/>
2986                 </fields>
2987                 <links>
2988                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2989                 </links>
2990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2991             <actions>
2992                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2993                 <retrieve/>
2994                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2995                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2996             </actions>
2997         </permacrud>
2998         </class>
2999         <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">
3000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3001                         <field name="id" reporter:datatype="id" />
3002                         <field name="target_copy" reporter:datatype="link" />
3003                         <field name="part" reporter:datatype="link"/>
3004                 </fields>
3005                 <links>
3006                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3007                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3008                 </links>
3009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010             <actions>
3011                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3012                 <retrieve/>
3013                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3014                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3015             </actions>
3016         </permacrud>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3020                         <field name="close_end" reporter:datatype="timestamp" />
3021                         <field name="close_start" reporter:datatype="timestamp" />
3022                         <field name="id" reporter:datatype="id" />
3023                         <field name="org_unit" reporter:datatype="org_unit"/>
3024                         <field name="reason" reporter:datatype="text"/>
3025                 </fields>
3026                 <links>
3027                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3028                 </links>
3029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3030             <actions>
3031                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3032                 <retrieve/>
3033                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3034                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3035             </actions>
3036         </permacrud>
3037         </class>
3038         <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">
3039                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3040                         <field name="extended" reporter:datatype="interval"/>
3041                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3042                         <field name="max_renewals" reporter:datatype="int" />
3043                         <field name="name" reporter:datatype="text"/>
3044                         <field name="normal" reporter:datatype="interval"/>
3045                         <field name="shrt" reporter:datatype="interval"/>
3046                 </fields>
3047                 <links>
3048                 </links>
3049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3050             <actions>
3051                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3052                 <retrieve/>
3053                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3054                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3055             </actions>
3056         </permacrud>
3057         </class>
3058
3059         <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">
3060                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3061                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3062                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3063             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3064                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3065             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3066                 </fields>
3067                 <links>
3068             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3069                 </links>
3070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071             <actions>
3072                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3073                 <retrieve/>
3074                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3075                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3076             </actions>
3077                 </permacrud>
3078         </class>
3079
3080         <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">
3081                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3082                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3083                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3084                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3085             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3086                 </fields>
3087                 <links>
3088                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3089                 </links>
3090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3093                 <retrieve/>
3094                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3095                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3096             </actions>
3097                 </permacrud>
3098         </class>
3099
3100         <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">
3101                 <fields oils_persist:primary="id" oils_persist:sequence="">
3102                         <field name="balance_owed" reporter:datatype="money"/>
3103                         <field name="id" reporter:datatype="id" />
3104                         <field name="last_billing_note" reporter:datatype="text"/>
3105                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3106                         <field name="last_billing_type" reporter:datatype="text"/>
3107                         <field name="last_payment_note" reporter:datatype="text"/>
3108                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3109                         <field name="last_payment_type" reporter:datatype="text"/>
3110                         <field name="total_owed" reporter:datatype="money"/>
3111                         <field name="total_paid" reporter:datatype="money"/>
3112                         <field name="usr" reporter:datatype="link"/>
3113                         <field name="xact_finish" reporter:datatype="timestamp" />
3114                         <field name="xact_start" reporter:datatype="timestamp" />
3115                         <field name="xact_type" reporter:datatype="text"/>
3116                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3117                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3120                         <field name="billing_location" reporter:datatype="link"/>
3121                 </fields>
3122                 <links>
3123                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3124                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3125                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3126                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3127                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3128                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3129                 </links>
3130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3131                         <actions>
3132                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3133                                         <context link="usr" field="home_ou" />
3134                                 </retrieve>
3135                         </actions>
3136                 </permacrud>
3137         </class>
3138         <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">
3139                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3140                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3141                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3142                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3143                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3144                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3146                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3148                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3149                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3150                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3151                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3152                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3153                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3154                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3155                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3156                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3157                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3158                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3159                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3160                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3161                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3162                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3163                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3164                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3165                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3166                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3167                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3168                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3169                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3170                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3171                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3172                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3173                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3174                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3175                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3176                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3177                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3178                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3179                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3180                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3181                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3182                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3183                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3184                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3185                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3186                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3187                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3188                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3189                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3190                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3191                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3193                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3203                 </fields>
3204                 <links>
3205                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3206                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3207                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3208                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3209                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3210                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3211                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3212                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3213                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3214                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3215                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3216                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3217                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3218                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3219                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3220                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3221                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3222                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3223                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3224                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3225                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3226                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3227                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3228                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3229                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3230                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3231                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3232                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3233                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3234                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3235                 </links>
3236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3237                         <actions>
3238                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3239                         </actions>
3240                 </permacrud>
3241         </class>
3242         <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">
3243                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3244                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3245                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3246                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3247                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3248                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3249                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3250                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3251                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3252         </fields>
3253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3254                         <actions>
3255                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3256                                 <retrieve/>
3257                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3258                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3259                         </actions>
3260                 </permacrud>
3261         </class>
3262         <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">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3264                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3265                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3266                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3267                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3268         </fields>
3269         <links>
3270                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3271                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3272                 </links>
3273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3274                         <actions>
3275                                 <retrieve permission="RUN_REPORTS">
3276                                         <context link="usr" field="home_ou" />
3277                                 </retrieve>
3278                         </actions>
3279                 </permacrud>
3280         </class>
3281         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3283                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3284                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3285                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3286                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3287                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3288                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3289         </fields>
3290         <links>
3291                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3292                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3293                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3294                 </links>
3295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3296                         <actions>
3297                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3298                                         <context link="usr" field="home_ou" />
3299                                         <context link="ws" field="owning_lib" />
3300                                 </retrieve>
3301                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3302                                         <context link="usr" field="home_ou" />
3303                                         <context link="ws" field="owning_lib" />
3304                                 </create>
3305                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3306                                         <context link="usr" field="home_ou" />
3307                                         <context link="ws" field="owning_lib" />
3308                                 </update>
3309                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3310                                         <context link="usr" field="home_ou" />
3311                                         <context link="ws" field="owning_lib" />
3312                                 </delete>
3313                         </actions>
3314                 </permacrud>
3315         </class>
3316         <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">
3317                 <fields oils_persist:primary="name">
3318                         <field name="name" reporter:datatype="text"/>
3319                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3320                 </fields>
3321                 <links/>
3322                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3323                         <actions>
3324                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3325                                 <retrieve/>
3326                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3327                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3328                         </actions>
3329                 </permacrud>
3330         </class>
3331         <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">
3332                 <fields oils_persist:primary="name">
3333                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3334                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3335                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3336                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3337                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3338                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3339                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3340                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3341                 </fields>
3342                 <links>
3343                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3344                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3345                 </links>
3346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3347                         <actions>
3348                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3349                                 <retrieve/>
3350                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3351                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3352                         </actions>
3353                 </permacrud>
3354         </class>
3355         <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">
3356                 <fields oils_persist:primary="name">
3357                         <field name="name" reporter:datatype="text"/>
3358                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3359                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3360                         <field name="datatype" reporter:datatype="text"/>
3361                         <field name="view_perm" reporter:datatype="link"/>
3362                         <field name="update_perm" reporter:datatype="link"/>
3363                         <field name="fm_class" reporter:datatype="text"/>
3364                         <field name="grp" reporter:datatype="link"/>
3365                 </fields>
3366                 <links>
3367                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3368                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3369                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3370                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3371                 </links>
3372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3373                         <actions>
3374                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3375                                 <retrieve/>
3376                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3377                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3378                         </actions>
3379                 </permacrud>
3380         </class>
3381         <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">
3382                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3383                         <field name="id" />
3384                         <field name="name"  reporter:datatype="text"/>
3385                         <field name="org_unit" reporter:datatype="org_unit"/>
3386                         <field name="value"  reporter:datatype="text"/>
3387                 </fields>
3388                 <links>
3389                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3390                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3391                 </links>
3392         </class>
3393         <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">
3394                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3395                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3396                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3397                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3398                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3399                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3400                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3401                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3402                 </fields>
3403                 <links>
3404                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3405                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3406                 </links>
3407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3408             <actions>
3409                 <create permission="CREATE_COPY_NOTE">
3410                     <context link="owning_copy" field="circ_lib"/>
3411                 </create>
3412                 <retrieve permission="VIEW_COPY_NOTES">
3413                     <context link="owning_copy" field="circ_lib"/>
3414                 </retrieve>
3415                 <update permission="UPDATE_COPY_NOTE">
3416                     <context link="owning_copy" field="circ_lib"/>
3417                 </update>
3418                 <delete permission="DELETE_COPY_NOTE">
3419                     <context link="owning_copy" field="circ_lib"/>
3420                 </delete>
3421             </actions>
3422         </permacrud>
3423         </class>
3424         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3425                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3426                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3427                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3428                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3429                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3430                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3431                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3432                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3433                 </fields>
3434                 <links>
3435                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3436                 </links>
3437         </class>
3438         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3439                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3440                         <field name="fingerprint"  reporter:datatype="text"/>
3441                         <field name="id" reporter:datatype="id" />
3442                         <field name="master_record" reporter:datatype="link"/>
3443                         <field name="mods"  reporter:datatype="text"/>
3444                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3445                 </fields>
3446                 <links>
3447                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3448                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3449                 </links>
3450         </class>
3451         <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">
3452                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3453                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3454                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3455                 </fields>
3456                 <links/>
3457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3458             <actions>
3459                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3460                 <retrieve/>
3461                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3462                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3463             </actions>
3464         </permacrud>
3465         </class>
3466         <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">
3467                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3468                         <field name="code"  reporter:datatype="text"/>
3469                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3470                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3471                 </fields>
3472                 <links/>
3473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3474             <actions>
3475                 <create permission="CREATE_PERM" global_required="true"/>
3476                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3477                 <update permission="UPDATE_PERM" global_required="true"/>
3478                 <delete permission="DELETE_PERM" global_required="true"/>
3479             </actions>
3480         </permacrud>
3481         </class>
3482         <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">
3483                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3484                         <field name="id" reporter:datatype="id" />
3485                         <field name="metarecord" reporter:datatype="link"/>
3486                         <field name="source" reporter:datatype="link"/>
3487                 </fields>
3488                 <links>
3489                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3490                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3491                 </links>
3492         </class>
3493         <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">
3494                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3495                         <field name="id" reporter:datatype="id" />
3496                         <field name="field" reporter:datatype="link"/>
3497                         <field name="source" reporter:datatype="link"/>
3498                         <field name="value"  reporter:datatype="text"/>
3499                 </fields>
3500                 <links>
3501                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3502                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3503                 </links>
3504         </class>
3505         <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">
3506                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3507                         <field name="id" reporter:datatype="id" />
3508                         <field name="value" reporter:datatype="text"/>
3509                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3510                 </fields>
3511                 <links>
3512                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3513                 </links>
3514         </class>
3515         <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">
3516                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3517                         <field name="id" reporter:datatype="id" />
3518                         <field name="entry" reporter:datatype="link"/>
3519                         <field name="def" reporter:datatype="link"/>
3520                         <field name="source" reporter:datatype="link"/>
3521                 </fields>
3522                 <links>
3523                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3524                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3525                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3526                 </links>
3527         </class>
3528         <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">
3529                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3530                         <field name="id" reporter:datatype="id" />
3531                         <field name="entry" reporter:datatype="link"/>
3532                         <field name="simple_heading" reporter:datatype="link"/>
3533                 </fields>
3534                 <links>
3535                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3536                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3537                 </links>
3538         </class>
3539         <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">
3540                 <oils_persist:source_definition>
3541                         SELECT * FROM metabib.author_field_entry
3542                                                 UNION ALL
3543                         SELECT * FROM metabib.keyword_field_entry
3544                                                 UNION ALL
3545                         SELECT * FROM metabib.identifier_field_entry
3546                                                 UNION ALL
3547                         SELECT * FROM metabib.title_field_entry
3548                                                 UNION ALL
3549                         SELECT * FROM metabib.subject_field_entry
3550                                                 UNION ALL
3551                         SELECT * FROM metabib.series_field_entry
3552                 </oils_persist:source_definition>
3553                 <fields>
3554                         <field name="field" reporter:datatype="link"/>
3555                         <field name="id" reporter:datatype="id" />
3556                         <field name="source" reporter:datatype="link"/>
3557                         <field name="value"  reporter:datatype="text"/>
3558                 </fields>
3559                 <links>
3560                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3561                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3562                 </links>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3566                         <field name="field" reporter:datatype="link"/>
3567                         <field name="id" reporter:datatype="id" />
3568                         <field name="source" reporter:datatype="link"/>
3569                         <field name="value"  reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3573                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3574                 </links>
3575         </class>
3576         <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">
3577                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3578                         <field name="accepting_usr" reporter:datatype="link"/>
3579                         <field name="amount" reporter:datatype="money" />
3580                         <field name="amount_collected" reporter:datatype="money" />
3581                         <field name="cash_drawer" reporter:datatype="link"/>
3582                         <field name="id" reporter:datatype="id" />
3583                         <field name="note"  reporter:datatype="text"/>
3584                         <field name="payment_ts" reporter:datatype="timestamp"/>
3585                         <field name="xact" reporter:datatype="link"/>
3586                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3587                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3588                 </fields>
3589                 <links>
3590                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3591                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3592                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3593                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3594                 </links>
3595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3596             <actions>
3597                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3598                     <context link="xact" jump="usr" field="home_ou"/>
3599                 </retrieve>
3600                         </actions>
3601                 </permacrud>
3602         </class>
3603         <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">
3604                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3605                         <field name="accepting_usr" reporter:datatype="link"/>
3606                         <field name="amount" reporter:datatype="money" />
3607                         <field name="amount_collected" reporter:datatype="money" />
3608                         <field name="id" reporter:datatype="id" />
3609                         <field name="note"  reporter:datatype="text"/>
3610                         <field name="payment_ts" reporter:datatype="timestamp"/>
3611                         <field name="xact" reporter:datatype="link"/>
3612                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3613                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3614                 </fields>
3615                 <links>
3616                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3617                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3618                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3619                 </links>
3620         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3621             <actions>
3622                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3623                     <context link="xact" jump="usr" field="home_ou"/>
3624                 </retrieve>
3625                         </actions>
3626                 </permacrud>
3627         </class>
3628         <class id="map" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3629                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3630                         <field name="accepting_usr" reporter:datatype="link"/>
3631                         <field name="amount" reporter:datatype="money" />
3632                         <field name="amount_collected" reporter:datatype="money" />
3633                         <field name="id" reporter:datatype="id" />
3634                         <field name="note"  reporter:datatype="text"/>
3635                         <field name="payment_ts" reporter:datatype="timestamp"/>
3636                         <field name="xact" reporter:datatype="link"/>
3637                         <field name="billing" reporter:datatype="link"/>
3638                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3639                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3640                 </fields>
3641                 <links>
3642                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3643                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3644                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3645                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3646                 </links>
3647         </class>
3648         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3649                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3650                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3651                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3652                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3653                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3654                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3655                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3656                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3657                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3658                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3659                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3660                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3661                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3662                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3663                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3664                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3665                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3666                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3667                 </fields>
3668                 <links>
3669                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3670                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3671                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3672                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3673                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3674                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3675                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3676                 </links>
3677         </class>
3678
3679         <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">
3680                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3681                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3682                         <field name="name"  reporter:datatype="text"/>
3683                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3684                         <field name="block_list" reporter:datatype="text"/>
3685                         <field name="staff_alert" reporter:datatype="bool"/>
3686                         <field name="org_depth" reporter:datatype="int"/>
3687                 </fields>
3688                 <links/>
3689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3690             <actions>
3691                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3692                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3693                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3694                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3695             </actions>
3696         </permacrud>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3700                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3701                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3702                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3703                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3704                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3705                 </fields>
3706                 <links>
3707                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3708                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3709                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3710         </links>
3711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3712             <actions>
3713                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3714                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3715                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3716                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3717             </actions>
3718         </permacrud>
3719         </class>
3720         <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">
3721                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3722                         <field name="holdable" reporter:datatype="bool"/>
3723                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3724                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3725                         <field name="opac_visible" reporter:datatype="bool"/>
3726             <field name="copy_active" reporter:datatype="bool"/>
3727             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3728                 </fields>
3729                 <links/>
3730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3731             <actions>
3732                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3733                 <retrieve/>
3734                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3735                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3736             </actions>
3737         </permacrud>
3738         </class>
3739         <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">
3740                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3741                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3742                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3743                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3744                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3745                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3746                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3747                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3748                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3749                 </fields>
3750                 <links>
3751                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3752                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3753                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3754                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3755                 </links>
3756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3757                         <actions>
3758                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3759                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3760                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3761                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3762                         </actions>
3763                 </permacrud>
3764         </class>
3765         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3766                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3767                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3768                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3769                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3770                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3771                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3772                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3773                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3774                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3775                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3776                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3777                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3778                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3779                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3780                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3781                 </fields>
3782                 <links>
3783                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3784                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3785                 </links>
3786         </class>
3787         <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">
3788                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3789                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3790                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3791                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3792                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3793                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3794                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3795                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3796                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3797                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3798                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3799                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3800                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3801                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3802                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3803                 </fields>
3804                 <links>
3805                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3806                 </links>
3807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3808                         <actions>
3809                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3810                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3811                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3812                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3813                         </actions>
3814                 </permacrud>
3815         </class>
3816
3817
3818         <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">
3819                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3820                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3821                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3822                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3823                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3824                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3825                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3826                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3827                 </fields>
3828                 <links>
3829                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3830                 </links>
3831         </class>
3832
3833         <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">
3834                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3835                         <field name="call_number" />
3836                         <field name="create_date" reporter:datatype="timestamp"/>
3837                         <field name="creator" reporter:datatype="link"/>
3838                         <field name="id" reporter:datatype="id" />
3839                         <field name="pub" reporter:datatype="bool"/>
3840                         <field name="title"  reporter:datatype="text"/>
3841                         <field name="value"  reporter:datatype="text"/>
3842                 </fields>
3843                 <links>
3844                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3845                 </links>
3846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3847             <actions>
3848                 <create permission="CREATE_VOLUME_NOTE">
3849                     <context link="call_number" field="owning_lib"/>
3850                 </create>
3851                 <retrieve permission="VIEW_VOLUME_NOTES">
3852                     <context link="call_number" field="owning_lib"/>
3853                 </retrieve>
3854                 <update permission="UPDATE_VOLUME_NOTE">
3855                     <context link="call_number" field="owning_lib"/>
3856                 </update>
3857                 <delete permission="DELETE_VOLUME_NOTE">
3858                     <context link="call_number" field="owning_lib"/>
3859                 </delete>
3860             </actions>
3861         </permacrud>
3862         </class>
3863         <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">
3864                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3865                         <field name="create_date" reporter:datatype="timestamp"/>
3866                         <field name="creator" reporter:datatype="link"/>
3867                         <field name="edit_date" reporter:datatype="timestamp"/>
3868                         <field name="editor" reporter:datatype="link"/>
3869                         <field name="id" reporter:datatype="id" />
3870                         <field name="record" reporter:datatype="link"/>
3871                         <field name="value" reporter:datatype="text"/>
3872                 </fields>
3873                 <links>
3874                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3875                 </links>
3876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3877             <actions>
3878                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3879                 <retrieve/>
3880                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3881                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3882             </actions>
3883         </permacrud>
3884         </class>
3885         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3886         <oils_persist:source_definition>
3887 SELECT  usr,
3888         SUM(
3889             CASE
3890                 WHEN (
3891                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3892                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3893                 ) THEN 1
3894                 ELSE 0
3895             END
3896         ) AS out,
3897
3898         SUM(
3899             CASE
3900                 WHEN (
3901                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3902                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3903                 ) THEN 1
3904                 ELSE 0
3905             END
3906         ) AS overdue,
3907
3908         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3909         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3910         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3911   FROM  action.circulation
3912   WHERE checkin_time IS NULL
3913   GROUP BY 1
3914         </oils_persist:source_definition>
3915         <fields oils_persist:primary="usr">
3916             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3917             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3918             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3919             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3920             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3921             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3922         </fields>
3923         <links>
3924             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3925         </links>
3926         </class>
3927         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3928         <oils_persist:source_definition>
3929 SELECT  usr,
3930         STRING_AGG(
3931             CASE
3932                 WHEN (
3933                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3934                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3935                 ) THEN id::TEXT
3936                 ELSE '0'
3937             END
3938         ,',') AS out,
3939
3940         STRING_AGG(
3941             CASE
3942                 WHEN (
3943                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3944                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3945                 ) THEN id::TEXT
3946                 ELSE '0'
3947             END
3948         ,',') AS overdue,
3949
3950         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3951         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3952         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3953   FROM  action.circulation
3954   WHERE checkin_time IS NULL
3955   GROUP BY 1
3956         </oils_persist:source_definition>
3957         <fields oils_persist:primary="usr">
3958             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3959             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3960             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3961             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3962             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3963             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3964         </fields>
3965         <links>
3966             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3967         </links>
3968         </class>
3969         <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">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3971                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3972                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3973                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3974                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3975                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3976                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3977                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3978                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3979                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3980                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3981                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3982                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3983                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3984                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3985                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3986                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3987                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3988                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3989                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3990                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3991                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3992                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3993                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3994                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3995                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
3996                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3997                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3998                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3999                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4000                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4001                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4002                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4003                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4004                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4005                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4006                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4007                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4008                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4009                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4010                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4011                 </fields>
4012                 <links>
4013                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4014                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4015                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4016                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4017                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4018                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4019                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4020                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4021                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4022                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4023                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4024                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4025                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4026                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4027                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4028                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4029                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4030                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4031                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4032                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4033                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4034                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4035                 </links>
4036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4037                         <actions>
4038                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4039                         </actions>
4040                 </permacrud>
4041         </class>
4042         <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">
4043                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4044                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4045                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4046                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4047                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4048                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4049                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4050                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4051                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4052                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4053                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4054                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4055                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4056                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4057                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4058                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4059                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4060                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4061                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4062                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4063                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4064                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4065                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4066                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4067                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4068                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4069                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4070                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4071                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4074                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4075                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4076                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4077                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4078                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4079                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4080                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4081                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4082                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4083                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4084                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4085                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4087                 </fields>
4088                 <links>
4089                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4090                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4091                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4092                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4093                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4094                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4095                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4096                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4097                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4098                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4099                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4100                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4101                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4102                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4103                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4104                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4105                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4106                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4107                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4108                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4109                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4110                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4111                 </links>
4112         </class>
4113         <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">
4114                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4115                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4116                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4117                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4118                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4119                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4120                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4121                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4122                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4123                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4124                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4125                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4126                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4127                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4128                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4129                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4130                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4131                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4132                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4133                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4134                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4135                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4136                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4137                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4138                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4139                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4140                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4141                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4142                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4143                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4144                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4145                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4147                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4149                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4150                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4151                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4152                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4153                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4154                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4155                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4156                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4157                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4158                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4159                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4160                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4161                 </fields>
4162                 <links>
4163                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4164                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4165                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4166                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4167                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4168                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4169                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4170                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4171                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4172                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4173                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4174                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4175                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4176                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4177                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4178                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4179                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4180                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4181                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4182                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4183                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4184                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4185                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4186                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4187                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4188                 </links>
4189         </class>
4190
4191         <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">
4192                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4193                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4194                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4195                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4196                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4197                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4198                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4199                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4200                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4201                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4202                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4203                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4204                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4205                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4206                 </fields>
4207                 <links>
4208                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4210                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4211                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4212                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4213                 </links>
4214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4215                         <actions>
4216                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4217                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4218                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4219                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4220                         </actions>
4221                 </permacrud>
4222         </class>
4223
4224         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4226                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4227                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4228                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4229                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4230                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4231                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4232                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4233                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4234                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4235                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4236                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4237                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4238                 </fields>
4239                 <links>
4240                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4241                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4242                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4243                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4244                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4245                 </links>
4246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4247                         <actions>
4248                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4249                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4250                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4251                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4252                         </actions>
4253                 </permacrud>
4254         </class>
4255         
4256         <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">
4257                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4258                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4259                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4260                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4261                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4262                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4263                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4264                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4265                 </fields>
4266                 <links>
4267                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4268                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4269                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4270                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4271                 </links>
4272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4273                         <actions>
4274                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4275                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4276                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4277                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4278                         </actions>
4279                 </permacrud>
4280         </class>
4281         
4282         <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">
4283                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4284                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4285                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4286                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4287                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4288                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4289                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4290                 </fields>
4291                 <links>
4292                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4293                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4294                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4295                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4296                 </links>
4297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4298                         <actions>
4299                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4300                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4301                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4302                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4303                         </actions>
4304                 </permacrud>
4305         </class>
4306         
4307         <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">
4308                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4309                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4310                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4311                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4312                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4313                 </fields>
4314                 <links>
4315                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4316                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4317                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4318                 </links>
4319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4320                         <actions>
4321                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4322                     <context link="resource" field="owner" />
4323                 </create>
4324                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4325                     <context link="resource" field="owner" />
4326                 </retrieve>
4327                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4328                     <context link="resource" field="owner" />
4329                 </update>
4330                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4331                     <context link="resource" field="owner" />
4332                 </delete>
4333                         </actions>
4334                 </permacrud>
4335         </class>
4336         
4337         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4338                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4339                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4340                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4341                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4342                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4344                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4345                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4346                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4347                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4348                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4349                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4350                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4351                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4352                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4353                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4354                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4355                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4356                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4357                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4358                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4359                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4360                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4361                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4362                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4363                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4364                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4365                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4366                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4367                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4368                 </fields>
4369                 <links>
4370                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4371                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4372                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4373                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4374                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4375                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4376                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4377                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4378                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4379                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4380                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4381                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4382                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4383                 </links>
4384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4385                         <actions>
4386                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4387                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4388                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4389                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4390                         </actions>
4391                 </permacrud>
4392         </class>
4393         
4394         <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">
4395                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4396                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4397                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4398                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4399                 </fields>
4400                 <links>
4401                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4402                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4403                 </links>
4404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4405                         <actions>
4406                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4407                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4408                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4409                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4410                         </actions>
4411                 </permacrud>
4412         </class>
4413
4414         <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">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4416                         <field name="bucket" reporter:datatype="link"/>
4417                         <field name="id" reporter:datatype="id" />
4418                         <field name="target_call_number" reporter:datatype="link" />
4419                         <field name="create_time" reporter:datatype="timestamp" />
4420                         <field name="pos" reporter:datatype="int" />
4421                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4422                 </fields>
4423                 <links>
4424                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4425                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4426             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4427                 </links>
4428         </class>
4429         <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">
4430                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4431                         <field name="id" reporter:datatype="id" />
4432                         <field name="item" reporter:datatype="link"/>
4433                         <field name="note" reporter:datatype="text" />
4434                 </fields>
4435                 <links>
4436                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4437                 </links>
4438         </class>
4439         <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">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4441                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4442                         <field name="btype" reporter:datatype="text"/>
4443                         <field name="id" reporter:datatype="id" />
4444                         <field name="name" reporter:datatype="text"/>
4445                         <field name="description" reporter:datatype="text"/>
4446                         <field name="owner" reporter:datatype="link"/>
4447                         <field name="pub" reporter:datatype="bool"/>
4448                         <field name="create_time" reporter:datatype="timestamp" />
4449                 </fields>
4450                 <links>
4451                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4452                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4453                 </links>
4454         </class>
4455         <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">
4456                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4457                         <field name="id" reporter:datatype="id" />
4458                         <field name="bucket" reporter:datatype="link"/>
4459                         <field name="note" reporter:datatype="text" />
4460                 </fields>
4461                 <links>
4462                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4463                 </links>
4464         </class>
4465         <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">
4466                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4467                         <field name="hold" reporter:datatype="link"/>
4468                         <field name="id" reporter:datatype="id" />
4469                         <field name="target_copy" reporter:datatype="link"/>
4470                         <field name="proximity" reporter:datatype="number"/>
4471                 </fields>
4472                 <links>
4473                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4474                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4475                 </links>
4476         </class>
4477         <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">
4478                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4479                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4480                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4481                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4482                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4483                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4484                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4485                 </fields>
4486                 <links>
4487                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4488                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4489                 </links>
4490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4491             <actions>
4492                 <create permission="CREATE_HOLD_NOTIFICATION">
4493                                         <context link="hold" jump="usr" field="home_ou" />
4494                                 </create>
4495                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4496                                         <context link="hold" jump="usr" field="home_ou" />
4497                                 </retrieve>
4498                 <update permission="CREATE_HOLD_NOTIFICATION">
4499                                         <context link="hold" jump="usr" field="home_ou" />
4500                                 </update>
4501                 <delete permission="CREATE_HOLD_NOTIFICATION">
4502                                         <context link="hold" jump="usr" field="home_ou" />
4503                                 </delete>
4504             </actions>
4505         </permacrud>
4506         </class>
4507         <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">
4508                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4509                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4510                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4511                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4512                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4513                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4514                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4515                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4516                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4517                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4518                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4519                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4520                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4521                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4522                 </fields>
4523                 <links>
4524                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4525                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4526                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4527                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4528                 </links>
4529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4530             <actions>
4531                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4532                 <retrieve/>
4533                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4534                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4535             </actions>
4536         </permacrud>
4537         </class>
4538         <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">
4539                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4540                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4541                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4542                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4543                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4544             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4545             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4546             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4547                 </fields>
4548                 <links>
4549                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4550                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4551                 </links>
4552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4553             <actions>
4554                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4555                 <retrieve/>
4556                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4557                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4558             </actions>
4559         </permacrud>
4560         </class>
4561         <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">
4562                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4563                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4564             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4565             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4566                 </fields>
4567                 <links>
4568                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4569                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4570                 </links>
4571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4572             <actions>
4573                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4574                                         <context link="lgroup" field="owner" />
4575                 </create>
4576                 <retrieve/>
4577                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4578                                         <context link="lgroup" field="owner" />
4579                 </update>
4580                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4581                                         <context link="lgroup" field="owner" />
4582                 </delete>
4583             </actions>
4584         </permacrud>
4585         </class>
4586
4587     <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">
4588         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4589             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4590             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4591             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4592             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4593         </fields>
4594         <links>
4595             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4596             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4597         </links>
4598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4599             <actions>
4600                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4601                 <retrieve/>
4602                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4603                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4604             </actions>
4605         </permacrud>
4606     </class>
4607
4608         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4609                 <fields>
4610                         <field name="sre_id" oils_persist:virtual="true" />
4611                         <field name="location" oils_persist:virtual="true" />
4612                         <field name="owning_lib" oils_persist:virtual="true" />
4613                         <field name="basic_holdings" oils_persist:virtual="true" />
4614                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4615                         <field name="supplement_holdings" oils_persist:virtual="true" />
4616                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4617                         <field name="index_holdings" oils_persist:virtual="true" />
4618                         <field name="index_holdings_add" oils_persist:virtual="true" />
4619                         <field name="online" oils_persist:virtual="true" />
4620                         <field name="missing" oils_persist:virtual="true" />
4621                         <field name="incomplete" oils_persist:virtual="true" />
4622                 </fields>
4623         </class>
4624
4625         <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">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4627                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4628                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4629                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4630                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4631                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4632                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4633                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4634                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4635                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4636                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4637                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4638                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4639                 </fields>
4640                 <links>
4641                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4644                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4645                 </links>
4646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4647                         <actions>
4648                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4649                                 <retrieve/>
4650                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4651                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4652                         </actions>
4653                 </permacrud>
4654         </class>
4655
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4659                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4660                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4661                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4662                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4663                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4664                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4665                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4666                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4667                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4668                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4669                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4670                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4671                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4672                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4673                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4674                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4675                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4676                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4677                 </fields>
4678                 <links>
4679                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4680                 </links>
4681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4682                         <actions>
4683                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4684                                         <context link="subscription" field="owning_lib" />
4685                                 </create>
4686                                 <retrieve />
4687                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4688                                         <context link="subscription" field="owning_lib" />
4689                                 </update>
4690                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4691                                         <context link="subscription" field="owning_lib" />
4692                                 </delete>
4693                         </actions>
4694                 </permacrud>
4695         </class>
4696
4697         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4698                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4699                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4700                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4701                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4702                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4703                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4704                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4705                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4706                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4707                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4708                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4709                 </fields>
4710                 <links>
4711                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4712                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4713                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4714                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4715                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4716                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4717                 </links>
4718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4719                         <actions>
4720                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4721                                 <retrieve />
4722                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4723                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4724                         </actions>
4725                 </permacrud>
4726         </class>
4727
4728         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4729                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4731                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4732                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4733                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4734                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4735                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4736                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4737                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4738                 </fields>
4739                 <links>
4740                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4741                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4742                 </links>
4743         </class>
4744
4745         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4748                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4749                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4750                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4751                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4752                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4753                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4754                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4755                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4756                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4757                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4758                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4759                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4760                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4762                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4763                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4764                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4765                 </fields>
4766                 <links>
4767                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4768                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4769                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4770                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4771                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4772                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4773                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4774                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4775                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4776                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4777                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4778                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4779                 </links>
4780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4781                         <actions>
4782                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4783                                 <retrieve />
4784                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4785                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4786                         </actions>
4787                 </permacrud>
4788         </class>
4789
4790         <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">
4791                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4792                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4793                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4794                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4795                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4796                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4797                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4798                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4799                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4800                 </fields>
4801                 <links>
4802                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4803                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4804                 </links>
4805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4806                         <actions>
4807                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4808                                         <context link="distribution" field="holding_lib" />
4809                                 </create>
4810                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4811                                         <context link="distribution" field="holding_lib" />
4812                                 </retrieve>
4813                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4814                                         <context link="distribution" field="holding_lib" />
4815                                 </update>
4816                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4817                                         <context link="distribution" field="holding_lib" />
4818                                 </delete>
4819                         </actions>
4820                 </permacrud>
4821         </class>
4822
4823         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4825                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4826                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4827                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4828                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4829                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4830                 </fields>
4831                 <links>
4832                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4833                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4834                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4835                 </links>
4836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4837                         <actions>
4838                                 <create permission="ADMIN_SERIAL_STREAM">
4839                                         <context link="distribution" field="holding_lib" />
4840                                 </create>
4841                                 <retrieve />
4842                                 <update permission="ADMIN_SERIAL_STREAM">
4843                                         <context link="distribution" field="holding_lib" />
4844                                 </update>
4845                                 <delete permission="ADMIN_SERIAL_STREAM">
4846                                         <context link="distribution" field="holding_lib" />
4847                                 </delete>
4848                         </actions>
4849                 </permacrud>
4850         </class>
4851
4852         <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">
4853                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4854                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4855                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4856                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4857                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4858                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4859                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4860                 </fields>
4861                 <links>
4862                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4863                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4864                 </links>
4865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4866                         <actions>
4867                                 <create permission="ADMIN_SERIAL_STREAM">
4868                                         <context link="stream" jump="distribution" field="holding_lib" />
4869                                 </create>
4870                                 <retrieve permission="RECEIVE_SERIAL">
4871                                         <context link="stream" jump="distribution" field="holding_lib" />
4872                                 </retrieve>
4873                                 <update permission="ADMIN_SERIAL_STREAM">
4874                                         <context link="stream" jump="distribution" field="holding_lib" />
4875                                 </update>
4876                                 <delete permission="ADMIN_SERIAL_STREAM">
4877                                         <context link="stream" jump="distribution" field="holding_lib" />
4878                                 </delete>
4879                         </actions>
4880                 </permacrud>
4881         </class>
4882
4883         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4884                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4885                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4886                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4887                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4888                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4889                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4890                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4891                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4892                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4893                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4894                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4895                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4896                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4897                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4898                 </fields>
4899                 <links>
4900                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4901                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4902                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4903                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4904                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4905                 </links>
4906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4907                         <actions>
4908                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4909                                         <context link="subscription" field="owning_lib" />
4910                                 </create>
4911                                 <retrieve/>
4912                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4913                                         <context link="subscription" field="owning_lib" />
4914                                 </update>
4915                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4916                                         <context link="subscription" field="owning_lib" />
4917                                 </delete>
4918                         </actions>
4919                 </permacrud>
4920         </class>
4921
4922         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4923                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4924                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4925                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4926                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4927                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4928                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4929                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4930                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4931                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4932                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4933                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4934                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4935                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4936                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4937                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4938                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4939                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4940                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4941                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4942                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4943                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4944                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4945                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4946                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4947                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4948                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4949                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4950                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4951                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4952                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4953                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4954                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4955                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4956                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4957                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4958                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4959                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4960                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4961                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4962                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4963                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4964                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4965                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4966                 </fields>
4967                 <links>
4968                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4969                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4970                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4971                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4972                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4973                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4974                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4975                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4976                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4977                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4978                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4979                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4980                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4981                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4982                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4983                 </links>
4984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4985                         <actions>
4986                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4987                                 <retrieve/>
4988                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4989                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4990                         </actions>
4991                 </permacrud>
4992         </class>
4993
4994         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4995                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4996                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4997                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4998                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4999                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5000                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5001                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5002                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5003                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5004                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5005                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5006                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5007                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5008                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5009                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5010                 </fields>
5011                 <links>
5012                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5013                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5014                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5015                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5016                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5017                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5018                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5019                 </links>
5020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5021                         <actions>
5022                                 <create permission="ADMIN_SERIAL_ITEM">
5023                                         <context link="stream" jump="distribution" field="holding_lib" />
5024                                 </create>
5025                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5026                                         <context link="stream" jump="distribution" field="holding_lib" />
5027                                 </retrieve>
5028                                 <update permission="ADMIN_SERIAL_ITEM">
5029                                         <context link="stream" jump="distribution" field="holding_lib" />
5030                                 </update>
5031                                 <delete permission="ADMIN_SERIAL_ITEM">
5032                                         <context link="stream" jump="distribution" field="holding_lib" />
5033                                 </delete>
5034                         </actions>
5035                 </permacrud>
5036         </class>
5037
5038         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5039                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5040                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5041                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5042                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5043                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5044                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5045                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5046                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5047                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5048                 </fields>
5049                 <links>
5050                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5051                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5052                 </links>
5053                 <!-- Not available via PCRUD at this time -->
5054         </class>
5055         <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">
5056                 <fields>
5057                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5058                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5059                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5060                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5061                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5062                 </fields>
5063                 <links>
5064                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5065                 </links>
5066         </class>
5067         <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">
5068                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5069                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5070                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5071                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5072                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5073                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5074                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5075                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5076                 </fields>
5077                 <links>
5078                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5079                 </links>
5080         </class>
5081         <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">
5082                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5083                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5084                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5085                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5086                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5087                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5088                 </fields>
5089                 <links>
5090                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5091                 </links>
5092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5093                         <actions>
5094                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5095                                         <context link="distribution" field="holding_lib" />
5096                                 </create>
5097                                 <retrieve/>
5098                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5099                                         <context link="distribution" field="holding_lib" />
5100                                 </update>
5101                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5102                                         <context link="distribution" field="holding_lib" />
5103                                 </delete>
5104                         </actions>
5105                 </permacrud>
5106         </class>
5107
5108         <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">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5110                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5111                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5112                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5113                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5114                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5115                 </fields>
5116                 <links>
5117                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5118                 </links>
5119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5120                         <actions>
5121                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5122                                         <context link="distribution" field="holding_lib" />
5123                                 </create>
5124                                 <retrieve/>
5125                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5126                                         <context link="distribution" field="holding_lib" />
5127                                 </update>
5128                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5129                                         <context link="distribution" field="holding_lib" />
5130                                 </delete>
5131                         </actions>
5132                 </permacrud>
5133         </class>
5134
5135         <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">
5136                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5137                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5138                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5139                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5140                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5141                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5142                 </fields>
5143                 <links>
5144                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5145                 </links>
5146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5147                         <actions>
5148                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5149                                         <context link="distribution" field="holding_lib" />
5150                                 </create>
5151                                 <retrieve/>
5152                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5153                                         <context link="distribution" field="holding_lib" />
5154                                 </update>
5155                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5156                                         <context link="distribution" field="holding_lib" />
5157                                 </delete>
5158                         </actions>
5159                 </permacrud>
5160         </class>
5161
5162         <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">
5163                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5164                         <field name="id" reporter:datatype="id" />
5165                         <field name="owning_copy" reporter:datatype="link"/>
5166                         <field name="stat_cat" reporter:datatype="link"/>
5167                         <field name="stat_cat_entry" reporter:datatype="link"/>
5168                 </fields>
5169                 <links>
5170                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5171                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5172                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5173                 </links>
5174         </class>
5175         <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">
5176                 <fields oils_persist:primary="code">
5177                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5178                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5179                 </fields>
5180                 <links/>
5181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5182             <actions>
5183                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5184                 <retrieve/>
5185                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5186                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5187             </actions>
5188         </permacrud>
5189         </class>
5190         <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">
5191                 <fields oils_persist:primary="code">
5192                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5193                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5194                 </fields>
5195                 <links/>
5196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5197             <actions>
5198                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5199                 <retrieve/>
5200                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5201                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5202             </actions>
5203         </permacrud>
5204         </class>
5205         <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">
5206                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5207                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5208                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5209                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5210                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5211                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5212                 </fields>
5213                 <links>
5214             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5215         </links>
5216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5217             <actions>
5218                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5219                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5220                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5221                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5222             </actions>
5223         </permacrud>
5224         </class>
5225         <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">
5226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5227                         <field name="id" reporter:datatype="id" />
5228                         <field name="name" reporter:datatype="text"/>
5229                 </fields>
5230                 <links/>
5231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5232             <actions>
5233                 <create permission="CREATE_LASSO" global_required="true"/>
5234                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5235                 <update permission="UPDATE_LASSO" global_required="true"/>
5236                 <delete permission="DELETE_LASSO" global_required="true"/>
5237             </actions>
5238         </permacrud>
5239         </class>
5240         <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">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5242                         <field name="id" reporter:datatype="id" />
5243                         <field name="lasso" reporter:datatype="link"/>
5244                         <field name="org_unit" reporter:datatype="org_unit"/>
5245                 </fields>
5246                 <links>
5247                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5248                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5249                 </links>
5250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5251             <actions>
5252                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5253                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5254                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5255                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5256             </actions>
5257         </permacrud>
5258         </class>
5259         <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">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5261                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5262                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5263                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5264                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5265                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5266                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5267                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5268                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5269                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5270                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5271                 </fields>
5272                 <links>
5273                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5275                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5276                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5277                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5278                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5279                 </links>
5280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5281             <actions>
5282                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5283                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5284                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5285                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5286             </actions>
5287         </permacrud>
5288         </class>
5289         <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">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5291                         <field name="id" reporter:datatype="id" />
5292                         <field name="from_org" reporter:datatype="org_unit"/>
5293                         <field name="to_org" reporter:datatype="org_unit"/>
5294                         <field name="prox" reporter:datatype="int" />
5295                 </fields>
5296                 <links>
5297                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5298                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5299                 </links>
5300         </class>
5301         <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">
5302                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5303                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5304                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5305                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5306                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5307                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5308                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5309                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5310                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5311                 </fields>
5312                 <links/>
5313         </class>
5314         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5315                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5316                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5319                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5321                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5322                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5323                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5324                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5325                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5326                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5327                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5328                 </fields>
5329                 <links>
5330                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5331                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5332                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5333                 </links>
5334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5335             <actions>
5336                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5337                 <retrieve/>
5338                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5339                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5340             </actions>
5341         </permacrud>
5342         </class>
5343         <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">
5344                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5345                         <field name="address_type"  reporter:datatype="text"/>
5346                         <field name="city"  reporter:datatype="text"/>
5347                         <field name="country"  reporter:datatype="text"/>
5348                         <field name="county"  reporter:datatype="text"/>
5349                         <field name="id" reporter:datatype="id" />
5350                         <field name="org_unit" reporter:datatype="org_unit"/>
5351                         <field name="post_code"  reporter:datatype="text"/>
5352                         <field name="state"  reporter:datatype="text"/>
5353                         <field name="street1"  reporter:datatype="text"/>
5354                         <field name="street2"  reporter:datatype="text"/>
5355                         <field name="valid" reporter:datatype="bool"/>
5356                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5357                 </fields>
5358                 <links>
5359                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5360                 </links>
5361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5362             <actions>
5363                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5364                 <retrieve/>
5365                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5366                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5367             </actions>
5368         </permacrud>
5369         </class>
5370         <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">
5371                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5372                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5373                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5374                         <field name="query_text" reporter:datatype="text"/>
5375                 </fields>
5376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5377             <actions>
5378                 <retrieve/>
5379             </actions>
5380         </permacrud>
5381         </class>
5382
5383         <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">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5385                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5386                         <field name="owner" reporter:datatype="org_unit"/>
5387                         <field name="code" reporter:datatype="text"/>
5388                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5389                         <field name="create_date" reporter:datatype="timestamp"/>
5390                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5391                 </fields>
5392                 <links>
5393                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5394                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5395                 </links>
5396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5397             <actions>
5398                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5399                 <retrieve/>
5400                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5401                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5402             </actions>
5403         </permacrud>
5404         </class>
5405         <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">
5406                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5407                         <field name="id" reporter:datatype="id"/>
5408                         <field name="grp" reporter:datatype="link"/>
5409                         <field name="pos" reporter:datatype="int"/>
5410                         <field name="query" reporter:datatype="link"/>
5411                 </fields>
5412                 <links>
5413                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5414                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5415                 </links>
5416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5417             <actions>
5418                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5419                     <context link="grp" field="owner"/>
5420                 </create>
5421                 <retrieve/>
5422                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5423                     <context link="grp" field="owner"/>
5424                 </update>
5425                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5426                     <context link="grp" field="owner"/>
5427                 </delete>
5428             </actions>
5429         </permacrud>
5430         </class>
5431
5432         <!-- A note: Please update alhr and ahopl when updating ahr -->
5433         <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">
5434                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5435                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5436                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5437                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5439                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5440                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5441                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5442                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5443                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5444                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5445                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5446                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5447                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5448                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5449                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5450                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5451                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5452                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5453                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5454                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5455                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5456                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5457                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5458                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5459                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5460                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5462                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5463                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5464                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5465                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5466                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5467                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5468                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5469                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5470                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5471                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5472                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5473                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5474                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5475                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5476                 </fields>
5477                 <links>
5478                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5479                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5480                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5481                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5482                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5483                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5484                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5485                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5486                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5487                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5488                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5489                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5490                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5491                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5492                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5493                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5494                 </links>
5495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5496                         <actions>
5497                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5498                         </actions>
5499                 </permacrud>
5500         </class>
5501         <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">
5502                 <oils_persist:source_definition><![CDATA[
5503                 SELECT
5504                         ahr.*,
5505                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5506                                 copy_location_order_position,
5507                         CASE WHEN au.alias IS NOT NULL THEN
5508                                 au.alias
5509                         ELSE
5510                                 au.first_given_name
5511                         END AS usr_alias_or_first_given_name,
5512                         au.first_given_name AS usr_first_given_name,
5513                         au.second_given_name AS usr_second_given_name,
5514                         au.family_name AS usr_family_name,
5515                         au.prefix AS usr_prefix,
5516                         au.suffix AS usr_suffix,
5517                         au.alias AS usr_alias,
5518                         CASE WHEN au.alias IS NOT NULL THEN
5519                                 au.alias
5520                         ELSE
5521                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5522                                         COALESCE(au.family_name, ''),
5523                                         COALESCE(au.suffix, ''),
5524                                         ', ',
5525                                         COALESCE(au.prefix, ''),
5526                                         COALESCE(au.first_given_name, ''),
5527                                         COALESCE(au.second_given_name, '')
5528                                 ], ' '), E'\\s+,', ',')
5529                         END AS usr_alias_or_display_name,
5530                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5531                                 COALESCE(au.family_name, ''),
5532                                 COALESCE(au.suffix, ''),
5533                                 ', ',
5534                                 COALESCE(au.prefix, ''),
5535                                 COALESCE(au.first_given_name, ''),
5536                                 COALESCE(au.second_given_name, '')
5537                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5538                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5539                                 AS call_number_label,
5540                         siss.label AS issuance_label,
5541                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5542                         ahcm_1.copy_count AS potential_copies
5543                 FROM action.hold_request ahr
5544                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5545                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5546                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5547                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5548                 JOIN actor.usr au ON (au.id = ahr.usr)
5549                 JOIN (
5550                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5551                         FROM asset.copy_location
5552                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5553                 LEFT JOIN actor.usr_standing_penalty ausp 
5554                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5555                 LEFT JOIN config.standing_penalty csp
5556                         ON (
5557                                 csp.id = ausp.standing_penalty AND 
5558                                 csp.block_list LIKE '%CAPTURE%' AND (
5559                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5560                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5561                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5562                                         )
5563                                 )
5564                         )
5565                 JOIN (
5566                         SELECT COUNT(target_copy) AS copy_count, hold
5567                         FROM action.hold_copy_map
5568                         GROUP BY 2
5569                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5570                 LEFT JOIN serial.issuance siss
5571                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5572                 LEFT JOIN asset.copy_location_order acplo
5573                         ON (acp.location = acplo.location AND
5574                                 acp.circ_lib = acplo.org)
5575                 WHERE
5576                         ahr.capture_time IS NULL AND
5577                         ahr.cancel_time IS NULL AND
5578                         csp.id IS NULL AND
5579                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5580                         acp.status IN (0,7)
5581                 ]]></oils_persist:source_definition>
5582                 <fields oils_persist:primary="id">
5583                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5584                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5585                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5586                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5587                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5588                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5589                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5590                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5591                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5592                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5593                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5594                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5595                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5596                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5597                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5598                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5599                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5600                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5601                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5602                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5603                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5604                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5605                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5606                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5607                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5608                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5609                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5610                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5611                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5612                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5613                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5614                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5615                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5616                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5617                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5618                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5619                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5620                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5621                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5622                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5623                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5624                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5625                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5626                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5627                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5628                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5629                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5630                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5631                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5632                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5633                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5634                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5635                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5636                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5637                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5638                 </fields>
5639                 <links>
5640                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5641                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5642                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5643                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5644                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5645                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5646                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5647                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5648                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5649                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5650                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5651                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5652                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5653                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5654                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5655                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5656                 </links>
5657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5658                         <actions>
5659                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5660                         </actions>
5661                 </permacrud>
5662         </class>
5663         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5664                 <oils_persist:source_definition>
5665                         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)
5666                 </oils_persist:source_definition>
5667                 <fields oils_persist:primary="id">
5668                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5669                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5670                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5671                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5672                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5673                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5674                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5675                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5676                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5677                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5678                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5679                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5680                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5681                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5682                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5683                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5684                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5686                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5687                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5688                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5689                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5690                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5692                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5693                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5694                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5695                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5696                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5697                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5698                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5699                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5700                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5701                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5702                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5703                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5704                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5705                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5706                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5707                 </fields>
5708                 <links>
5709                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5710                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5711                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5712                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5713                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5714                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5715                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5716                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5717                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5718                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5719                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5720                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5721                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5722                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5723                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5724                 </links>
5725         </class>
5726
5727         <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">
5728                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5729                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5730                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5731                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5732                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5733                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5734                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5735                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5736                 </fields>
5737                 <links>
5738                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5739                 </links>
5740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741                         <actions>
5742                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5743                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5744                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5745                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5746                         </actions>
5747                 </permacrud>
5748         </class>
5749         <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">
5750                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5751                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5752                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5753                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5754                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5755                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5757                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5758                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5759                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5760                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5761                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5762                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5763                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5764                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5765                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5767                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5768                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5769                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5770                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5771                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5772                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5773                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5774                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5775                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5776                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5778                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5779                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5780                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5781                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5782                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5783                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5784                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5785                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5786                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5787                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5788                 </fields>
5789                 <links>
5790                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5791                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5792                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5793                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5794                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5795                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5796                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5798                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5799                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5800                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5801                 </links>
5802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5803                         <actions>
5804                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5805                         </actions>
5806                 </permacrud>
5807         </class>
5808         <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">
5809                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5810                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5811                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5812                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5813                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5814                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5815                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5816                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5817                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5818                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5819                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5820                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5821                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5822                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5823                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5824                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5825                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5826                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5827                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5828                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5829                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5830                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5831                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5832                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5833                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5834                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5835                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5837                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5838                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5839                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5840                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5841                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5842                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5843                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5844                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5845                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5846                 </fields>
5847                 <links>
5848                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5849                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5850                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5851                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5852                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5853                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5854                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5855                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5856                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5857                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5858                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5859                 </links>
5860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5861                         <actions>
5862                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5863                         </actions>
5864                 </permacrud>
5865         </class>
5866
5867         <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">
5868                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5869                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5870                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5871                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5872                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5873                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5874                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5875                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5876                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5877                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5878                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5879                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5880                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5881                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5882                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5883                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5884                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5885                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5886                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5887                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5889                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5893                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5894                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5895                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5896                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5897                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5898                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5899                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5900                 </fields>
5901                 <links>
5902                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5903                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5904                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5905                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5906                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5907                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5908                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5909                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5910                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5911                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5912                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5913                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5914                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5915                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5916                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5917                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5918                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5919                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5920                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5921                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5922                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5923                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5924                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5925                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5926                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5927                 </links>
5928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5929             <actions>
5930                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5931                 <retrieve />
5932                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5933                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5934             </actions>
5935         </permacrud>
5936         </class>
5937         <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">
5938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5940                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5941                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5942                 </fields>
5943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5944                         <actions>
5945                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5946                                 <retrieve/>
5947                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5948                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5949                         </actions>
5950                 </permacrud>
5951         </class>
5952         <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">
5953                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5954                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5955                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5956                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5957                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5958                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5959                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5960                 </fields>
5961                 <links>
5962                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5963                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5964                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5965                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5966                 </links>
5967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5968                         <actions>
5969                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5970                                 <retrieve/>
5971                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5972                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5973                         </actions>
5974                 </permacrud>
5975         </class>
5976         <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">
5977                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5978                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5979                         <field name="btype" reporter:datatype="text"/>
5980                         <field name="id" reporter:datatype="id" />
5981                         <field name="name"  reporter:datatype="text"/>
5982                         <field name="description" reporter:datatype="text"/>
5983                         <field name="owner" reporter:datatype="link"/>
5984                         <field name="pub" reporter:datatype="bool"/>
5985                         <field name="create_time" reporter:datatype="timestamp" />
5986                 </fields>
5987                 <links>
5988                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5989                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5990                 </links>
5991         </class>
5992         <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">
5993                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5994                         <field name="id" reporter:datatype="id" />
5995                         <field name="bucket" reporter:datatype="link"/>
5996                         <field name="note" reporter:datatype="text" />
5997                 </fields>
5998                 <links>
5999                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6000                 </links>
6001         </class>
6002         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6003                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6004                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6005                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6006                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6007                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6008                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6009                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6010                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6011                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6012                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6013                 </fields>
6014                 <links>
6015                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6016                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6017                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6018                 </links>
6019         </class>
6020         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6021                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6022                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6023                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6024                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6025                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6026                 </fields>
6027                 <links>
6028                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6029                 </links>
6030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6031                         <actions>
6032                                 <retrieve permission="VIEW_USER">
6033                                         <context link="usr" field="home_ou" />
6034                                 </retrieve>
6035                         </actions>
6036                 </permacrud>
6037         </class>
6038     <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">
6039         <fields oils_persist:primary="field">
6040             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6041             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6042             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6043         </fields>
6044         <links/>
6045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6046             <actions>
6047                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6048                 <retrieve />
6049                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6050                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6051             </actions>
6052         </permacrud>
6053     </class>
6054         <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">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6056                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6057                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6058                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6059                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6060                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6061                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6062                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6063                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6064                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6065                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6066                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6067                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6068                 </fields>
6069                 <links>
6070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6071                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6072                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6073                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6074                 </links>
6075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6076             <actions>
6077                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6078                 <retrieve />
6079                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6080                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6081             </actions>
6082         </permacrud>
6083         </class>
6084         <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">
6085                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6086                         <field name="field" reporter:datatype="link"/>
6087                         <field name="id" reporter:datatype="id" />
6088                         <field name="source" reporter:datatype="link"/>
6089                         <field name="value"  reporter:datatype="text"/>
6090                 </fields>
6091                 <links>
6092                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6093                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6094                 </links>
6095         </class>
6096         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6097                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6098                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6099                         <field name="btype" reporter:datatype="text"/>
6100                         <field name="id" reporter:datatype="id" />
6101                         <field name="name"  reporter:datatype="text"/>
6102                         <field name="description" reporter:datatype="text"/>
6103                         <field name="owner" reporter:datatype="link"/>
6104                         <field name="pub" reporter:datatype="bool"/>
6105                         <field name="create_time" reporter:datatype="timestamp" />
6106                 </fields>
6107                 <links>
6108                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6109                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6110                 </links>
6111         </class>
6112         <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">
6113                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6114                         <field name="id" reporter:datatype="id" />
6115                         <field name="bucket" reporter:datatype="link"/>
6116                         <field name="note" reporter:datatype="text" />
6117                 </fields>
6118                 <links>
6119                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6120                 </links>
6121         </class>
6122         <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">
6123                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6124                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6125                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6126                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6127                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6128                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6129                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6130                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6131                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6132                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6133                 </fields>
6134                 <links>
6135                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6136                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6137                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6138                 </links>
6139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6140             <actions>
6141                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6142                     <context link="xact" jump="usr" field="home_ou"/>
6143                 </retrieve>
6144                         </actions>
6145                 </permacrud>
6146         </class>
6147         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6148                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6149                         <field name="id" reporter:datatype="id" />
6150                         <field name="ind1" />
6151                         <field name="ind2" />
6152                         <field name="record" />
6153                         <field name="subfield" />
6154                         <field name="tag" />
6155                         <field name="value" />
6156                 </fields>
6157                 <links>
6158                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6159                 </links>
6160         </class>
6161         <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">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6163                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6164                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6165                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6166                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6167                 </fields>
6168                 <links>
6169                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6170                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6171                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6172                 </links>
6173         </class>
6174         <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">
6175                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6176                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6177                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6178                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6179                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6180                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6181                 </fields>
6182                 <links>
6183                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6184                 </links>
6185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6186             <actions>
6187                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6188                 <retrieve/>
6189                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6190                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6191             </actions>
6192         </permacrud>
6193
6194         </class>
6195         <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">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6197                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6198                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6199                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6200                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6201                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6202                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6203                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6204                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6205                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6206                 </fields>
6207                 <links>
6208                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6209                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6210                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6211                 </links>
6212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6213             <actions>
6214                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6215                 <retrieve/>
6216                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6217                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6218             </actions>
6219         </permacrud>
6220         </class>
6221         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6222                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6223                         <field name="create_date" reporter:datatype="timestamp"/>
6224                         <field name="creator" reporter:datatype="link"/>
6225                         <field name="edit_date" reporter:datatype="timestamp"/>
6226                         <field name="editor" reporter:datatype="link"/>
6227                         <field name="id" reporter:datatype="id" />
6228                         <field name="pub" reporter:datatype="bool"/>
6229                         <field name="record" reporter:datatype="link"/>
6230                         <field name="value"  reporter:datatype="text"/>
6231                 </fields>
6232                 <links>
6233                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6234                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6235                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6236                 </links>
6237         </class>
6238         <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">
6239                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6240                         <field name="balance_owed" reporter:datatype="money" />
6241                         <field name="total_owed" reporter:datatype="money" />
6242                         <field name="total_paid" reporter:datatype="money" />
6243                         <field name="usr" reporter:datatype="link"/>
6244                 </fields>
6245                 <links>
6246                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6247                 </links>
6248         </class>
6249         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6250                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6251                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6252                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6253                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6254                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6255                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6256                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6257                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6258                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6260                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6261                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6262                 </fields>
6263                 <links>
6264                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6265                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6266                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6267                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6268                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6269                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6270                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6271                 </links>
6272         </class>
6273         <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">
6274                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6275                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6276                         <field name="quality" reporter:datatype="int" />
6277                         <field name="source" reporter:datatype="text"/>
6278                         <field name="transcendant" reporter:datatype="bool"/>
6279                         <field name="can_have_copies" reporter:datatype="bool"/>
6280                 </fields>
6281                 <links/>
6282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6283             <actions>
6284                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6285                 <retrieve/>
6286                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6287                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6288             </actions>
6289         </permacrud>
6290         </class>
6291         <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">
6292                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6293                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6294                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6295                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6296                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6297                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6298                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6299                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6300                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6301                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6302                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6303                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6304                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6305                 </fields>
6306                 <links>
6307                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6308                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6309                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6310                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6311                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6312                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6313                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6314                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6315                 </links>
6316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6317                         <actions>
6318                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6319                                         <context link="usr" field="home_ou" />
6320                                 </retrieve>
6321                         </actions>
6322                 </permacrud>
6323         </class>
6324         <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">
6325                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6326                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6327                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6328                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6329                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6330                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6331                 </fields>
6332                 <links>
6333                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6334                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6335                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6336                 </links>
6337         </class>
6338         <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">
6339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6340                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6341                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6342                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6343                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6344                 </fields>
6345                 <links>
6346                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6347                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6348                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6349                 </links>
6350         </class>
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6353                         <field name="bucket" reporter:datatype="link"/>
6354                         <field name="id" reporter:datatype="id" />
6355                         <field name="target_user" reporter:datatype="link"/>
6356                         <field name="create_time" reporter:datatype="timestamp" />
6357                         <field name="pos" reporter:datatype="int" />
6358                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6359                 </fields>
6360                 <links>
6361                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6362                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6363             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6364                 </links>
6365         </class>
6366         <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">
6367                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6368                         <field name="id" reporter:datatype="id" />
6369                         <field name="item" reporter:datatype="link"/>
6370                         <field name="note" reporter:datatype="text" />
6371                 </fields>
6372                 <links>
6373                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6374                 </links>
6375         </class>
6376         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6377                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6378                         <field name="balance_owed" reporter:datatype="money" />
6379                         <field name="total_owed" reporter:datatype="money" />
6380                         <field name="total_paid" reporter:datatype="money" />
6381                         <field name="usr" reporter:datatype="link"/>
6382                 </fields>
6383                 <links>
6384                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6385                 </links>
6386         </class>
6387         <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">
6388                 <fields oils_persist:primary="code" oils_persist:sequence="">
6389                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6390                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6391                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6392                 </fields>
6393                 <links/>
6394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6395             <actions>
6396                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6397                 <retrieve/>
6398                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6399                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6400             </actions>
6401         </permacrud>
6402         </class>
6403         <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">
6404                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6405                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6406                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6407                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6408                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6409                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6410                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6412                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6413                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6414                 </fields>
6415                 <links>
6416                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6417                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6418                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6419                 </links>
6420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6421             <actions>
6422                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6423                     <context link="xact" jump="usr" field="home_ou"/>
6424                 </retrieve>
6425                         </actions>
6426                 </permacrud>
6427         </class>
6428         <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">
6429                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6430                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6431                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6432                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6433                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6434                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6435                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6436                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6437                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6438                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6439                 </fields>
6440                 <links>
6441                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6442                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6443                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6444                 </links>
6445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6446             <actions>
6447                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6448                     <context link="xact" jump="usr" field="home_ou"/>
6449                 </retrieve>
6450                         </actions>
6451                 </permacrud>
6452         </class>
6453         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6454                 <fields oils_persist:primary="id" oils_persist:sequence="">
6455                         <field name="checkin_lib" reporter:datatype="link"/>
6456                         <field name="checkin_staff" reporter:datatype="link"/>
6457                         <field name="checkin_time" reporter:datatype="timestamp"/>
6458                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6459                         <field name="circ_staff" reporter:datatype="link"/>
6460                         <field name="desk_renewal" reporter:datatype="bool"/>
6461                         <field name="due_date" reporter:datatype="timestamp"/>
6462                         <field name="duration" reporter:datatype="interval"/>
6463                         <field name="duration_rule" reporter:datatype="link"/>
6464                         <field name="fine_interval" reporter:datatype="interval"/>
6465                         <field name="id" reporter:datatype="id" />
6466                         <field name="max_fine" reporter:datatype="money" />
6467                         <field name="max_fine_rule" reporter:datatype="link"/>
6468                         <field name="opac_renewal" reporter:datatype="bool"/>
6469                         <field name="phone_renewal" reporter:datatype="bool"/>
6470                         <field name="recurring_fine" reporter:datatype="money" />
6471                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6472                         <field name="renewal_remaining" reporter:datatype="int" />
6473             <field name="grace_period" reporter:datatype="interval" />
6474                         <field name="stop_fines" reporter:datatype="text"/>
6475                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6476                         <field name="target_copy" reporter:datatype="link"/>
6477                         <field name="usr" reporter:datatype="link"/>
6478                         <field name="xact_finish" reporter:datatype="timestamp" />
6479                         <field name="xact_start" reporter:datatype="timestamp" />
6480                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6481                 </fields>
6482                 <links>
6483                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6484                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6485                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6486                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6487                 </links>
6488         </class>
6489         <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">
6490                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6491                         <field name="field" reporter:datatype="link"/>
6492                         <field name="id" reporter:datatype="id" />
6493                         <field name="source" reporter:datatype="link"/>
6494                         <field name="value" reporter:datatype="text"/>
6495                 </fields>
6496                 <links>
6497                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6498                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6499                 </links>
6500         </class>
6501         <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">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6503                         <field name="high" reporter:datatype="money" />
6504                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6505                         <field name="low" reporter:datatype="money" />
6506                         <field name="name" reporter:datatype="text"/>
6507                         <field name="normal" reporter:datatype="money" />
6508                         <field name="recurrence_interval" reporter:datatype="interval"/>
6509             <field name="grace_period" reporter:datatype="interval" />
6510                 </fields>
6511                 <links/>
6512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6513             <actions>
6514                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6515                 <retrieve/>
6516                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6517                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6518             </actions>
6519         </permacrud>
6520         </class>
6521         <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">
6522                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6523                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6524                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6525                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6526                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6527                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6528                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6529                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6530                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6531                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6532                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6533                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6534                 </fields>
6535                 <links>
6536                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6537                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6538                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6539                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6540                 </links>
6541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6542             <actions>
6543                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6544                     <context link="xact" jump="usr" field="home_ou"/>
6545                 </retrieve>
6546                         </actions>
6547                 </permacrud>
6548         </class>
6549         <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">
6550                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6551                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6552                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6553                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6554                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6555                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6556                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6557                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6558                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6559                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6560                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6561                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6562                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6563                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6564                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6565                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6566                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6567                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6568                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6569                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6570                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6571                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6572                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6573                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6574                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6575                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6576                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6577                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6578                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6579                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6580                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6581                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6582                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6583                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6584                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6585                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6587                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6588                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6589                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6590                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6591                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6592                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6593                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6594                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6595                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6596                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6597                 </fields>
6598                 <links>
6599                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6600                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6601                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6602                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6603                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6604                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6605                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6606                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6607                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6608                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6609                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6610                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6611                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6612                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6613                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6614                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6615                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6616                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6617                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6618                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6619                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6620                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6621                 </links>
6622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623             <actions>
6624                 <create permission="CREATE_COPY">
6625                     <context link="call_number" field="owning_lib"/>
6626                 </create>
6627                 <retrieve/>
6628                 <update permission="UPDATE_COPY">
6629                     <context link="call_number" field="owning_lib"/>
6630                 </update>
6631                 <delete permission="DELETE_COPY">
6632                     <context link="call_number" field="owning_lib"/>
6633                 </delete>
6634             </actions>
6635         </permacrud>
6636         </class>
6637
6638         <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">
6639                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6640                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6641                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6642                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6643                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6644                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6647                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6648                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6649                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6650                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6651                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6652                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6653                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6654                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6655                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6656                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6657                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6658                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6659                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6660                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6661                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6662                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6663                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6664                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6665                 </fields>
6666                 <links>
6667                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6669                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6670                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6671                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6672                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6673                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6674                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6675                 </links>
6676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6677                         <actions>
6678                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6679                                 <retrieve />
6680                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6681                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6682                         </actions>
6683                 </permacrud>
6684         </class>
6685
6686         <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">
6687                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6688                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6689                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6690                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6691                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6692                 </fields>
6693                 <links/>
6694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6695             <actions>
6696                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6697                 <retrieve/>
6698                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6699                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6700             </actions>
6701         </permacrud>
6702         </class>
6703         <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">
6704                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6705                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6706                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6707                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6708                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6709                 </fields>
6710                 <links/>
6711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6712             <actions>
6713                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6714                 <retrieve/>
6715                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6716                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6717             </actions>
6718         </permacrud>
6719         </class>
6720         <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">
6721                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6722                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6723                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6724                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6725                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6726                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6727                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6728                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6729                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6730                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6731                 </fields>
6732                 <links>
6733                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6734                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6735                 </links>
6736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6737             <actions>
6738                 <create permission="CREATE_PERM" global_required="true"/>
6739                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6740                 <update permission="UPDATE_PERM" global_required="true"/>
6741                 <delete permission="DELETE_PERM" global_required="true"/>
6742             </actions>
6743         </permacrud>
6744         </class>
6745         <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">
6746                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6747                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6748                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6749                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6750                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6751                 </fields>
6752                 <links>
6753                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6754                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6755                 </links>
6756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6757             <actions>
6758                 <create permission="ADMIN_SURVEY">
6759                     <context link="question" jump="survey" field="owner"/>
6760                 </create>
6761                 <retrieve/>
6762                 <update permission="ADMIN_SURVEY">
6763                     <context link="question" jump="survey" field="owner"/>
6764                 </update>
6765                 <delete permission="ADMIN_SURVEY">
6766                     <context link="question" jump="survey" field="owner"/>
6767                 </delete>
6768             </actions>
6769         </permacrud>
6770         </class>
6771         <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">
6772                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6773                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6774                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6775                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6776                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6777                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6778                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6779                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6780                 </fields>
6781                 <links>
6782                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6783                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6784                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6785                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6786                 </links>
6787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6788                         <actions>
6789                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6790                         </actions>
6791                 </permacrud>
6792         </class>
6793         <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">
6794                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6795                         <field name="balance_owed" reporter:datatype="money" />
6796                         <field name="total_owed" reporter:datatype="money" />
6797                         <field name="total_paid" reporter:datatype="money" />
6798                         <field name="usr" reporter:datatype="link"/>
6799                 </fields>
6800                 <links>
6801                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6802                 </links>
6803         </class>
6804         <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">
6805                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6806                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6807                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6808                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6809                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6810                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6811                 </fields>
6812                 <links>
6813                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6814                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6815                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6816                 </links>
6817         </class>
6818         <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">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6820                         <field name="field" reporter:datatype="link"/>
6821                         <field name="id" reporter:datatype="id" />
6822                         <field name="source" reporter:datatype="link"/>
6823                         <field name="value" reporter:datatype="text"/>
6824                 </fields>
6825                 <links>
6826                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6827                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6828                 </links>
6829         </class>
6830         <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">
6831                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6832                         <field name="field" reporter:datatype="link"/>
6833                         <field name="id" reporter:datatype="id" />
6834                         <field name="source" reporter:datatype="link"/>
6835                         <field name="value" reporter:datatype="text"/>
6836                 </fields>
6837                 <links>
6838                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6839                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6840                 </links>
6841         </class>
6842         <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">
6843                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6844                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6845                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6846                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6847                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6848                 </fields>
6849                 <links>
6850                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6851                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6852                 </links>
6853         </class>
6854         <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">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6856                         <field name="depth" reporter:datatype="int" />
6857                         <field name="grantable" reporter:datatype="bool"/>
6858                         <field name="grp" reporter:datatype="link"/>
6859                         <field name="id" reporter:datatype="id" />
6860                         <field name="perm" reporter:datatype="link"/>
6861                 </fields>
6862                 <links>
6863                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6864                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6865                 </links>
6866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6867             <actions>
6868                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6869                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6870                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6871                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6872             </actions>
6873         </permacrud>
6874         </class>
6875         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6876                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6877                         <field name="items" oils_persist:virtual="true" />
6878                         <field name="btype" reporter:datatype="text"/>
6879                         <field name="id" reporter:datatype="id" />
6880                         <field name="name" reporter:datatype="text"/>
6881                         <field name="description" reporter:datatype="text"/>
6882                         <field name="owner" reporter:datatype="link"/>
6883                         <field name="pub" reporter:datatype="bool"/>
6884                         <field name="create_time" reporter:datatype="timestamp" />
6885                 </fields>
6886                 <links>
6887                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6888                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6889                 </links>
6890         </class>
6891         <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">
6892                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6893                         <field name="id" reporter:datatype="id" />
6894                         <field name="bucket" reporter:datatype="link"/>
6895                         <field name="note" reporter:datatype="text" />
6896                 </fields>
6897                 <links>
6898                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6899                 </links>
6900         </class>
6901         <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">
6902                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6903                         <field name="id" reporter:datatype="int" />
6904                         <field name="usr" reporter:datatype="link"/>
6905                         <field name="work_ou" reporter:datatype="link"/>
6906                 </fields>
6907                 <links>
6908                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6909                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6910                 </links>
6911         </class>
6912         <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">
6913                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6914                         <field name="depth" reporter:datatype="int"/>
6915                         <field name="grantable" reporter:datatype="bool"/>
6916                         <field name="id" reporter:datatype="id" />
6917                         <field name="perm" reporter:datatype="link"/>
6918                         <field name="usr" reporter:datatype="link"/>
6919                 </fields>
6920                 <links>
6921                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6922                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6923                 </links>
6924         </class>
6925         <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">
6926                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6927                         <field name="object_id" reporter:datatype="text"/>
6928                         <field name="grantable" reporter:datatype="bool"/>
6929                         <field name="id" reporter:datatype="id" />
6930                         <field name="perm" reporter:datatype="link"/>
6931                         <field name="usr" reporter:datatype="link"/>
6932                         <field name="object_type" reporter:datatype="text"/>
6933                 </fields>
6934                 <links>
6935                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6936                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6937                 </links>
6938         </class>
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="">
6941                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6942                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6943                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6944                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6945                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6946                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6947                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6948                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6949                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6950                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6951                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6952                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6953                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6954                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6955                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
6956                 </fields>
6957                 <links>
6958                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6959                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6960                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6961                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6962                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6963                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6964                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6965                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="map"/>
6966                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6967                 </links>
6968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6969             <actions>
6970                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6971                     <context link="xact" jump="usr" field="home_ou"/>
6972                 </retrieve>
6973                         </actions>
6974                 </permacrud>
6975         </class>
6976         <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">
6977                 <fields oils_persist:primary="id" oils_persist:sequence="">
6978                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6979                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6980                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6981                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6982                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6983                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6984                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6985                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6986                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6987                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6988                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6989                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6990                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6991                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6992                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6993                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
6994                 </fields>
6995                 <links>
6996                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6997                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6998                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6999                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7000                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7001                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7002                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7003                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="mvp"/>
7004                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7005                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7006                 </links>
7007         </class>
7008         <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">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="">
7010                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7011                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7012                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7013                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7014                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7015                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7016                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7017                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7018                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7019                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7020                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7021                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7022                 </fields>
7023                 <links>
7024                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7025                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7026                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7027                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7028                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="mvp"/>
7029                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7030                 </links>
7031         </class>
7032         <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">
7033                 <fields oils_persist:primary="id" oils_persist:sequence="">
7034                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7035                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7036                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7037                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7038                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7039                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7040                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7041                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7042                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7043                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7044                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7045                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7046                 </fields>
7047                 <links>
7048                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7049                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7050                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7051                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7052                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7053                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7054                 </links>
7055         </class>
7056         <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">
7057                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7058                         <field name="bucket" reporter:datatype="link"/>
7059                         <field name="id" reporter:datatype="id" />
7060                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7061                         <field name="create_time" reporter:datatype="timestamp" />
7062                         <field name="pos" reporter:datatype="int" />
7063                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7064                 </fields>
7065                 <links>
7066                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7067                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7068             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7069                 </links>
7070         </class>
7071         <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">
7072                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7073                         <field name="id" reporter:datatype="id" />
7074                         <field name="item" reporter:datatype="link"/>
7075                         <field name="note" reporter:datatype="text" />
7076                 </fields>
7077                 <links>
7078                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7079                 </links>
7080         </class>
7081         <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">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7083                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7084                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7085                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7086                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7087                 </fields>
7088                 <links>
7089                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7090                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7091                 </links>
7092         </class>
7093     <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">
7094         <fields oils_persist:primary="field">
7095             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7096             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7097             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7098         </fields>
7099         <links/>
7100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7101             <actions>
7102                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7103                 <retrieve />
7104                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7105                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7106             </actions>
7107         </permacrud>
7108     </class>
7109         <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">
7110                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7111                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7112                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7113                 </fields>
7114                 <links/>
7115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7116             <actions>
7117                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7118                 <retrieve/>
7119                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7120                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7121             </actions>
7122         </permacrud>
7123         </class>
7124
7125
7126         <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">
7127                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7128                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7129                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7130                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7131                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7132                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7133                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7134                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7135                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7136                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7137                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7138                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7139                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7140                 </fields>
7141                 <links>
7142                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7143                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7144                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7145                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7146                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7147                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7148                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7149                 </links>
7150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7151             <actions>
7152                 <create permission="TRANSIT_COPY">
7153                     <context link="target_copy" field="owner"/>
7154                 </create>
7155                 <retrieve/>
7156                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7157                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7158             </actions>
7159         </permacrud>
7160         </class>
7161         <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">
7162                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7163                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7164                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7165                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7166                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7167                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7168                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7169                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7170                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7171                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7172                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7173                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7174                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7175                 </fields>
7176                 <links>
7177                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7178                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7179                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7180                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7181                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7182                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7183                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7184                 </links>
7185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7186             <actions>
7187                 <create permission="TRANSIT_COPY" context_field="owner">
7188                     <context link="target_copy" field="circ_lib"/>
7189                 </create>
7190                 <retrieve/>
7191                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7192                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7193             </actions>
7194         </permacrud>
7195         </class>
7196         <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">
7197                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7198                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7199                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7200                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7201                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7202                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7203                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7204                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7205                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7206                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7207                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7208                 </fields>
7209                 <links>
7210                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7211                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7212                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7213                 </links>
7214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215             <actions>
7216                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7217                     <context link="xact" jump="usr" field="home_ou"/>
7218                 </retrieve>
7219                         </actions>
7220                 </permacrud>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7224                         <field name="grp" />
7225                         <field name="id" reporter:datatype="id" />
7226                         <field name="usr" />
7227                 </fields>
7228                 <links>
7229                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7230                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7231                 </links>
7232         </class>
7233         <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">
7234                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7235                         <field name="id" reporter:datatype="id" />
7236                         <field name="fq_field" reporter:datatype="text"/>
7237                         <field name="identity_value" reporter:datatype="text"/>
7238                         <field name="translation" reporter:datatype="text"/>
7239                         <field name="string" reporter:datatype="text"/>
7240                 </fields>
7241                 <links>
7242                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7243                 </links>
7244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7245             <actions>
7246                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7247                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7248                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7249                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7250             </actions>
7251         </permacrud>
7252         </class>
7253         <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">
7254                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7255                         <field name="id" reporter:datatype="id" />
7256                         <field name="fm_class" reporter:datatype="text"/>
7257                         <field name="field" reporter:datatype="text"/>
7258                         <field name="owner" reporter:datatype="org_unit"/>
7259                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7260                 </fields>
7261                 <links>
7262                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7263                 </links>
7264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7265             <actions>
7266                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7267                 <retrieve/>
7268                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7269                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7270             </actions>
7271         </permacrud>
7272         </class>
7273         <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">
7274                 <fields oils_persist:primary="code">
7275                         <field name="code" reporter:datatype="id" />
7276                         <field name="marc_code" reporter:datatype="text"/>
7277                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7278                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7279                 </fields>
7280                 <links/>
7281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7282             <actions>
7283                 <create permission="CREATE_LOCALE" global_required="true"/>
7284                 <retrieve/>
7285                 <update permission="UPDATE_LOCALE" global_required="true"/>
7286                 <delete permission="DELETE_LOCALE" global_required="true"/>
7287             </actions>
7288         </permacrud>
7289         </class>
7290         <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">
7291                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7292                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7293                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7294                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7295             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7296                 </fields>
7297                 <links>
7298                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7299                 </links>
7300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7301             <actions>
7302                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7303                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7304                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7305                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7306             </actions>
7307         </permacrud>
7308         </class>
7309
7310         <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">
7311                 <fields oils_persist:primary="id">
7312                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7313                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7314                 </fields>
7315                 <links/>
7316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7317             <actions>
7318                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7319                 <retrieve/>
7320                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7321                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7322             </actions>
7323         </permacrud>
7324         </class>
7325
7326         <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">
7327                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7328                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7329                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7330                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7331                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7332                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7333                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7334                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7335                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7336                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7337                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7338                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7339                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7340                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7341                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7342                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7343                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7344                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7345                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7346                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7347                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7348                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7349                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7350                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7351                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7352                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7353                 </fields>
7354                 <links>
7355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7356                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7357                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7358                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7359                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7360                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7361                 </links>
7362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7363             <actions>
7364                 <create permission="user_request.create">
7365                     <context link="usr" field="home_ou"/>
7366                                 </create>
7367                 <retrieve permission="user_request.view">
7368                     <context link="usr" field="home_ou"/>
7369                                 </retrieve>
7370                 <update permission="user_request.update">
7371                     <context link="usr" field="home_ou"/>
7372                                 </update>
7373                 <delete permission="user_request.delete">
7374                     <context link="usr" field="home_ou"/>
7375                                 </delete>
7376             </actions>
7377         </permacrud>
7378         </class>
7379
7380         <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">
7381                 <fields oils_persist:primary="code">
7382                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7383                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7384                 </fields>
7385                 <links/>
7386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7387             <actions>
7388                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7389                 <retrieve/>
7390                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7391                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7392             </actions>
7393         </permacrud>
7394         </class>
7395
7396         <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">
7397                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7398                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7399                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7400                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7401                         <field reporter:label="Ratio" name="ratio" />
7402                 </fields>
7403                 <links>
7404                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7405                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7406                 </links>
7407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7408                         <actions>
7409                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7410                                 <retrieve/>
7411                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7412                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7413                         </actions>
7414                 </permacrud>
7415         </class>
7416
7417         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7418                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7419                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7420                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7421                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7422                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7423                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7424                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7425                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7426                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7427                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7428                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7429                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7430                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7431                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7432                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7433                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7434                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7435                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7436                 </fields>
7437                 <links>
7438                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7439                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7440             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7441             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7442             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7443                 </links>
7444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7445             <actions>
7446                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7447                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7448                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7449                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7450             </actions>
7451         </permacrud>
7452         </class>
7453
7454         <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">
7455                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7456                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7457                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7458                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7459                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7460                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7461                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7462                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7463                 </fields>
7464                 <links>
7465                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7466                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7467                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7468                 </links>
7469         </class>
7470
7471         <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">
7472                 <fields oils_persist:primary="code">
7473                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7474                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7475                 </fields>
7476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7477             <actions>
7478                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7479                 <retrieve/>
7480                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7481                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7482             </actions>
7483                 </permacrud>
7484         </class>
7485
7486         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7488                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7489                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7490                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7491                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7492                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7493                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7494                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7495                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7496                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7497                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7498                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7499                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7500                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7501                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7502                 </fields>
7503                 <links>
7504                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7505                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7506                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7507                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7508                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7509                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7510                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7511                 </links>
7512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7513             <actions>
7514                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7515                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7516                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7517                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7518             </actions>
7519         </permacrud>
7520         </class>
7521
7522         <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">
7523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7524                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7525                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7526                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7527                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7528                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7529                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7530                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7531                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7532                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7533                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7534                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7535                 </fields>
7536                 <links>
7537                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7538                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7539                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7540                 </links>
7541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7542             <actions>
7543                 <create   permission="ADMIN_INVOICE">
7544                                         <context link="invoice" field="receiver"/>
7545                                 </create>
7546                 <retrieve permission="ADMIN_INVOICE">
7547                                         <context link="invoice" field="receiver"/>
7548                                 </retrieve>
7549                 <update   permission="ADMIN_INVOICE">
7550                                         <context link="invoice" field="receiver"/>
7551                                 </update>
7552                                 <delete   permission="ADMIN_INVOICE">
7553                                         <context link="invoice" field="receiver"/>
7554                                 </delete>
7555             </actions>
7556         </permacrud>
7557         </class>
7558
7559         <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">
7560                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7562                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7563                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7564                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7565                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7566                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7567                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7568                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7569                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7570                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7571                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7572                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7573                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7574                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7575                 </fields>
7576                 <links>
7577                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7578                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7579                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7580                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7581                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7582                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7583                 </links>
7584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7585             <actions>
7586                 <create   permission="ADMIN_INVOICE">
7587                                         <context link="invoice" field="receiver"/>
7588                                 </create>
7589                 <retrieve permission="ADMIN_INVOICE">
7590                                         <context link="invoice" field="receiver"/>
7591                                 </retrieve>
7592                 <update   permission="ADMIN_INVOICE">
7593                                         <context link="invoice" field="receiver"/>
7594                                 </update>
7595                                 <delete   permission="ADMIN_INVOICE">
7596                                         <context link="invoice" field="receiver"/>
7597                                 </delete>
7598             </actions>
7599         </permacrud>
7600         </class>
7601
7602         <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">
7603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7604                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7605                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7606                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7607                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7608                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7609                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7610                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7611                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7612                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7613                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7614                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7615                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7616                 </fields>
7617                 <links>
7618                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7619                 </links>
7620         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7621             <actions>
7622                 <create permission="ADMIN_PROVIDER">
7623                     <context link="provider" field="owner"/>
7624                 </create>
7625                 <retrieve permission="ADMIN_PROVIDER">
7626                     <context link="provider" field="owner"/>
7627                 </retrieve>
7628                 <update permission="ADMIN_PROVIDER">
7629                     <context link="provider" field="owner"/>
7630                 </update>
7631                 <delete permission="ADMIN_PROVIDER">
7632                     <context link="provider" field="owner"/>
7633                 </delete>
7634             </actions>
7635         </permacrud>
7636         </class>
7637
7638         <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">
7639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7640                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7641                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7642                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7643                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7644                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7645                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7646         </fields>
7647                 <links>
7648                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7649                 </links>
7650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7651             <actions>
7652                 <create permission="ADMIN_PROVIDER">
7653                     <context link="provider" field="owner"/>
7654                 </create>
7655                 <retrieve permission="ADMIN_PROVIDER">
7656                     <context link="provider" field="owner"/>
7657                 </retrieve>
7658                 <update permission="ADMIN_PROVIDER">
7659                     <context link="provider" field="owner"/>
7660                 </update>
7661                 <delete permission="ADMIN_PROVIDER">
7662                     <context link="provider" field="owner"/>
7663                 </delete>
7664             </actions>
7665         </permacrud>
7666     </class>
7667         <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">
7668                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7669                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7670                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7671                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7672                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7673                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7674                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7675                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7676                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7677                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7678                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7679                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7680                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7681                 </fields>
7682                 <links>
7683                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7684                 </links>
7685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7686             <actions>
7687                 <create permission="ADMIN_PROVIDER">
7688                     <context link="contact" jump='provider' field="owner"/>
7689                 </create>
7690                 <retrieve permission="ADMIN_PROVIDER">
7691                     <context link="contact" jump='provider' field="owner"/>
7692                 </retrieve>
7693                 <update permission="ADMIN_PROVIDER">
7694                     <context link="contact" jump='provider' field="owner"/>
7695                 </update>
7696                 <delete permission="ADMIN_PROVIDER">
7697                     <context link="contact" jump='provider' field="owner"/>
7698                 </delete>
7699             </actions>
7700         </permacrud>
7701         </class>
7702
7703         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7704                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7705                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7706                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7707                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7708                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7709                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7710                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7711                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7712                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7713                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7714                 </fields>
7715                 <links>
7716                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7717                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7718                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7719                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7720                 </links>
7721         </class>
7722
7723         <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">
7724                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7725                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7726                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7727                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7728                 </fields>
7729                 <links>
7730             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7731                 </links>
7732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7733                         <actions>
7734                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7735                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7736                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7737                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7738                         </actions>
7739                 </permacrud>
7740         </class>
7741
7742         <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">
7743                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7744                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7745                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7746                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7747                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7748                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7749                 </fields>
7750                 <links>
7751                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7752                 </links>
7753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7754                         <actions>
7755                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7756                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7757                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7758                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7759                         </actions>
7760                 </permacrud>
7761         </class>
7762
7763         <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">
7764                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7765                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7766                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7767                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7768                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7769                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7770                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7771                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7772                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7773                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7774                 </fields>
7775                 <links>
7776                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7777                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7778             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7779             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7780                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7781                 </links>
7782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7783             <actions>
7784                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7785                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7786                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7787                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7788             </actions>
7789         </permacrud>
7790         </class>
7791
7792         <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">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7794                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7795                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7796                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7797                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7798                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7799                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7800                 </fields>
7801                 <links>
7802                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7803                 </links>
7804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7805                         <actions>
7806                                 <create permission="ADMIN_FUNDING_SOURCE">
7807                     <context link="funding_source" field="owner"/>
7808                 </create>
7809                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7810                     <context link="funding_source" field="owner"/>
7811                 </retrieve>
7812                                 <update permission="ADMIN_FUNDING_SOURCE">
7813                     <context link="funding_source" field="owner"/>
7814                 </update>
7815                                 <delete permission="ADMIN_FUNDING_SOURCE">
7816                     <context link="funding_source" field="owner"/>
7817                 </delete>
7818                         </actions>
7819                 </permacrud>
7820         </class>
7821
7822         <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">
7823                 <fields oils_persist:primary="id">
7824                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7825                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7826                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7827                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7828                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7829                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7830                 </fields>
7831                 <links>
7832                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7833                 </links>
7834         </class>
7835
7836         <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">
7837                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7838                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7839                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7840                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7841                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7842                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7843                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7844                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7845                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7846                 </fields>
7847                 <links>
7848                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7849                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7850                 </links>
7851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7852                         <actions>
7853                                 <create permission="ADMIN_ACQ_FUND">
7854                     <context link="fund" field="org"/>
7855                 </create>
7856                                 <retrieve permission="ADMIN_ACQ_FUND">
7857                     <context link="fund" field="org"/>
7858                 </retrieve>
7859                                 <update permission="ADMIN_ACQ_FUND">
7860                     <context link="fund" field="org"/>
7861                 </update>
7862                                 <delete permission="ADMIN_ACQ_FUND">
7863                     <context link="fund" field="org"/>
7864                 </delete>
7865                         </actions>
7866                 </permacrud>
7867         </class>
7868
7869         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7870                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7871                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7872                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7873                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7874                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7875                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7876                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7877                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7878                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7879                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7880                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7881                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7882                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7883                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7884                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7885                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7886                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7887                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7888                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7889                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7890                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7891                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7892                 </fields>
7893                 <links>
7894                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7895                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7896             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7897             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7898             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7899             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7900             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7901             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7902             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7903             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7904             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7905                 </links>
7906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7907             <actions>
7908                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7909                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7910                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7911                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7912             </actions>
7913         </permacrud>
7914         </class>
7915
7916         <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">
7917                 <fields oils_persist:primary="fund">
7918                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7919                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7920                 </fields>
7921                 <links>
7922                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7923                 </links>
7924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7925             <actions>
7926                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7927                                         <context link="fund" field="org" />
7928                 </retrieve>
7929             </actions>
7930         </permacrud>
7931         </class>
7932
7933         <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">
7934                 <fields oils_persist:primary="fund">
7935                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7936                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7937                 </fields>
7938                 <links>
7939                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7940                 </links>
7941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7942             <actions>
7943                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7944                                         <context link="fund" field="org" />
7945                 </retrieve>
7946             </actions>
7947         </permacrud>
7948         </class>
7949
7950         <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">
7951                 <fields oils_persist:primary="fund">
7952                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7953                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7954                 </fields>
7955                 <links>
7956                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7957                 </links>
7958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7959             <actions>
7960                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7961                                         <context link="fund" field="org" />
7962                 </retrieve>
7963             </actions>
7964         </permacrud>
7965         </class>
7966
7967         <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">
7968                 <fields oils_persist:primary="fund">
7969                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7970                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7971                 </fields>
7972                 <links>
7973                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7974                 </links>
7975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7976             <actions>
7977                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7978                                         <context link="fund" field="org" />
7979                 </retrieve>
7980             </actions>
7981         </permacrud>
7982         </class>
7983
7984         <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">
7985                 <fields oils_persist:primary="fund">
7986                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7987                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7988                 </fields>
7989                 <links>
7990                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7991                 </links>
7992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7993             <actions>
7994                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7995                                         <context link="fund" field="org" />
7996                 </retrieve>
7997             </actions>
7998         </permacrud>
7999         </class>
8000
8001    <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">
8002         <fields oils_persist:primary="fund">
8003             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8004             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8005         </fields>
8006         <links>
8007             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8008         </links>
8009     </class>
8010
8011    <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">
8012         <fields oils_persist:primary="fund">
8013             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8014             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8015         </fields>
8016         <links>
8017             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8018         </links>
8019     </class>
8020
8021    <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">
8022         <fields oils_persist:primary="fund">
8023             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8024             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8025         </fields>
8026         <links>
8027             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8028         </links>
8029     </class>
8030
8031    <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">
8032         <fields oils_persist:primary="fund">
8033             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8034             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8035         </fields>
8036         <links>
8037             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8038         </links>
8039     </class>
8040
8041    <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">
8042         <fields oils_persist:primary="fund">
8043             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8044             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8045         </fields>
8046         <links>
8047             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8048         </links>
8049     </class>
8050
8051         <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">
8052                 <fields oils_persist:primary="funding_source">
8053                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8054                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8055                 </fields>
8056                 <links>
8057                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8058                 </links>
8059         </class>
8060
8061         <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">
8062                 <fields oils_persist:primary="funding_source">
8063                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8064                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8065                 </fields>
8066                 <links>
8067                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8068                 </links>
8069         </class>
8070
8071         <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">
8072                 <fields oils_persist:primary="funding_source">
8073                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8074                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8075                 </fields>
8076                 <links>
8077                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8078                 </links>
8079         </class>
8080
8081         <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">
8082                 <fields oils_persist:primary="fund">
8083                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8084                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8085                 </fields>
8086                 <links>
8087                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8088                 </links>
8089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8090             <actions>
8091                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8092                                         <context link="fund" field="org" />
8093                 </retrieve>
8094             </actions>
8095         </permacrud>
8096     </class>
8097     <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">
8098         <oils_persist:source_definition><![CDATA[
8099             SELECT
8100                 acqf.*,
8101                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8102                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8103                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8104                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8105             FROM
8106                 acq.fund acqf
8107                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8108                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8109                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8110                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8111         ]]></oils_persist:source_definition>
8112         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8113             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8114             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8115             <field reporter:label="Name" name="name" reporter:datatype="text" />
8116             <field reporter:label="Year" name="year" reporter:datatype="int" />
8117             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8118             <field reporter:label="Code" name="code" reporter:datatype="text" />
8119             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8120             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8121             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8122             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8123             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8124
8125             <!-- non fund-native fields -->
8126             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8127             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8128             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8129             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8130         </fields>
8131         <links>
8132             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8133             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8134             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8135         </links>
8136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8137             <actions>
8138                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8139             </actions>
8140         </permacrud>
8141         </class>
8142         <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">
8143                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8144                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8145                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8146                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8147                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8148                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8149                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8150                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8151                 </fields>
8152                 <links>
8153                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8154                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8155                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8156                 </links>
8157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8158                         <actions>
8159                                 <create permission="ADMIN_ACQ_FUND">
8160                     <context link="fund" field="org"/>
8161                 </create>
8162                                 <retrieve permission="ADMIN_ACQ_FUND">
8163                     <context link="fund" field="org"/>
8164                 </retrieve>
8165                                 <update permission="ADMIN_ACQ_FUND">
8166                     <context link="fund" field="org"/>
8167                 </update>
8168                                 <delete permission="ADMIN_ACQ_FUND">
8169                     <context link="fund" field="org"/>
8170                 </delete>
8171                         </actions>
8172                 </permacrud>
8173         </class>
8174
8175     <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">
8176         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8177             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8178             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8179             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8180             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8181             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8182             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8183             <field reporter:label="Note" name="note" reporter:datatype="text" />
8184             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8185         </fields>
8186         <links>
8187             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8188             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8189             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8190         </links>
8191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8192                         <actions>
8193                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8194                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8195                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8196                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8197                         </actions>
8198                 </permacrud>
8199     </class>
8200
8201         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8202                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8203                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8204                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8205                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8206                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8207                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8208                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8209                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8210                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8211                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8212                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8213                 </fields>
8214                 <links>
8215                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8216                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8217                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8218                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8219                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8220                 </links>
8221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8222                         <actions>
8223                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8224                         </actions>
8225                 </permacrud>
8226         </class>
8227
8228         <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">
8229                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8230                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8231                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8232                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8233                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8234                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8235                 </fields>
8236                 <links>
8237                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8238                 </links>
8239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8240                         <actions>
8241                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8242                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8243                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8244                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8245                         </actions>
8246                 </permacrud>
8247         </class>
8248
8249         <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">
8250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8251                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8252                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8253                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8254                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8255                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8256                         <field reporter:label="State" name="state" reporter:datatype="text" />
8257                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8258                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8259                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8260                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8261                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8262                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8263                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8264                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8265                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8266                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8267                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8268                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8269                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8270                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8271                 </fields>
8272                 <links>
8273                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8274                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8275                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8276                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8277                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8278                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8279                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8280                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8281                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8282                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8283                 </links>
8284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8285                         <actions>
8286                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8287                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8288                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8289                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8290                         </actions>
8291                 </permacrud>
8292         </class>
8293
8294         <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">
8295                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8296                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8297                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8298                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8299                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8300                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8301                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8302                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8303                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8304                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8305                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8306                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8307                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8308                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8309                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8310                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8311                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8312                 </fields>
8313                 <links>
8314                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8315                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8316                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8317                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8318                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8319                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8320                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8321                 </links>
8322                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8323             <actions>
8324                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8325             </actions>
8326                 </permacrud>
8327         </class>
8328
8329         <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">
8330                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8331                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8332                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8333                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8334                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8335                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8336                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8337                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8338                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8339                 </fields>
8340                 <links>
8341                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8342                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8343                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8344                 </links>
8345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8346             <actions>
8347                 <create permission="CREATE_PURCHASE_ORDER">
8348                     <context link="purchase_order" field="ordering_agency"/>
8349                 </create>
8350                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8351                     <context link="purchase_order" field="ordering_agency"/>
8352                 </retrieve>
8353                 <update permission="CREATE_PURCHASE_ORDER">
8354                     <context link="purchase_order" field="ordering_agency"/>
8355                 </update>
8356                 <delete permission="CREATE_PURCHASE_ORDER">
8357                     <context link="purchase_order" field="ordering_agency"/>
8358                 </delete>
8359             </actions>
8360                 </permacrud>
8361         </class>
8362
8363         <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">
8364                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8365                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8366                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8367                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8368                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8369                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8370                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8371                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8372                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8373                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8374                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8375                 </fields>
8376                 <links>
8377                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8378                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8379                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8380                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8381                 </links>
8382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8383             <actions>
8384                 <create permission="CREATE_PURCHASE_ORDER">
8385                     <context link="purchase_order" field="ordering_agency"/>
8386                 </create>
8387                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8388                     <context link="purchase_order" field="ordering_agency"/>
8389                 </retrieve>
8390                 <update permission="CREATE_PURCHASE_ORDER">
8391                     <context link="purchase_order" field="ordering_agency"/>
8392                 </update>
8393                 <delete permission="CREATE_PURCHASE_ORDER">
8394                     <context link="purchase_order" field="ordering_agency"/>
8395                 </delete>
8396             </actions>
8397                 </permacrud>
8398         </class>
8399
8400         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8401                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8402                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8403                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8404                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8405                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8406                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8407                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8408                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8409                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8410                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8411                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8412                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8413                         <field reporter:label="State" name="state" reporter:datatype="text" />
8414                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8415                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8416                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8417                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8418                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8419                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8420                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8421                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8422                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8423                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8424                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8425                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8426                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8427                 </fields>
8428                 <links>
8429                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8430                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8431                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8432                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8433                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8434                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8435                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8436                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8437                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8438                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8439                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8440                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8441                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8442                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8443                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8444                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8445                 </links>
8446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8447                         <actions>
8448                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8449                                         <context link="purchase_order" field="ordering_agency"/>
8450                                         <context link="picklist" field="org_unit"/>
8451                                 </retrieve>
8452                         </actions>
8453                 </permacrud>
8454         </class>
8455
8456         <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">
8457                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8458                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8459                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8460                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8461                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8462                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8463                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8464                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8465                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8466                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8467                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8468                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8469                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8470                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8471                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8472                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8473                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8474                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8475                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8476                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8477                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8478                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8479                 </fields>
8480                 <links>
8481                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8482                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8483                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8484                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8485                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8486                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8487                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8488                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8489                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8490                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8492                 </links>
8493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8494                         <actions>
8495                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8496                                         <context link="purchase_order" field="ordering_agency"/>
8497                                         <context link="picklist" field="org_unit"/>
8498                                 </retrieve>
8499                         </actions>
8500                 </permacrud>
8501         </class>
8502
8503         <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">
8504                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8505                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8506                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8507                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8508                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8509                 </fields>
8510                 <links>
8511                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8512                 </links>
8513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8514                         <actions>
8515                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8516                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8517                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8518                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8519                         </actions>
8520                 </permacrud>
8521         </class>
8522
8523         <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">
8524                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8525                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8526                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8527                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8528                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8529                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8530                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8531                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8532                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8533                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8534                 </fields>
8535                 <links>
8536                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8537                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8538                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8539                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8540                 </links>
8541         </class>
8542
8543         <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">
8544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8545                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8546                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8547                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8548                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8549                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8550                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8551                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8552                 </fields>
8553                 <links>
8554                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8555                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8556                 </links>
8557         </class>
8558
8559         <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">
8560                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8561                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8562                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8563                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8564                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8565                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8566                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8567                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8568                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8569                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8570                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8571                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8572                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8573                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8574                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8575                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8576                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8577                 </fields>
8578                 <links>
8579                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8580                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8581                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8582                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8583                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8584                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8585                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8586                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8587                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8588                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8589                 </links>
8590         </class>
8591
8592         <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">
8593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8594                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8595                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8596                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8597                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8598                 </fields>
8599                 <links/>
8600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8601                         <actions>
8602                                 <retrieve />
8603                         </actions>
8604                 </permacrud>
8605         </class>
8606
8607         <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">
8608                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8609                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8610                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8611                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8612                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8613                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8614             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8615                 </fields>
8616                 <links/>
8617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8618             <actions>
8619                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8620                 <retrieve />
8621                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8622                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8623             </actions>
8624         </permacrud>
8625         </class>
8626
8627         <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">
8628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8629                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8630                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8632                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8633                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8634                 </fields>
8635                 <links/>
8636         </class>
8637         <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">
8638                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8639                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8640                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8641                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8642                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8643                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8644                 </fields>
8645                 <links>
8646                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8647                 </links>
8648         </class>
8649
8650         <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">
8651             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8652                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8653                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8654                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8655                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8656                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8657                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8658         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8659
8660             </fields>
8661             <links>
8662                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8663             </links>
8664             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8665                 <actions>
8666                     <create permission="ADMIN_PROVIDER">
8667                         <context link="provider" field="owner"/>
8668                     </create>
8669                     <retrieve permission="ADMIN_PROVIDER">
8670                         <context link="provider" field="owner"/>
8671                     </retrieve>
8672                     <update permission="ADMIN_PROVIDER">
8673                         <context link="provider" field="owner"/>
8674                     </update>
8675                     <delete permission="ADMIN_PROVIDER">
8676                         <context link="provider" field="owner"/>
8677                     </delete>
8678                 </actions>
8679             </permacrud>
8680         </class>
8681         
8682         <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">
8683             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8684                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8685                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8686                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8687                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8688             </fields>
8689             <links>
8690                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8691             </links>
8692             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8693                 <actions>
8694                     <create permission="ADMIN_PROVIDER">
8695                         <context link="provider" field="owner"/>
8696                     </create>
8697                     <retrieve permission="ADMIN_PROVIDER">
8698                         <context link="provider" field="owner"/>
8699                     </retrieve>
8700                     <update permission="ADMIN_PROVIDER">
8701                         <context link="provider" field="owner"/>
8702                     </update>
8703                     <delete permission="ADMIN_PROVIDER">
8704                         <context link="provider" field="owner"/>
8705                     </delete>
8706                 </actions>
8707             </permacrud>
8708         </class>
8709         
8710         <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">
8711             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8712                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8713                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8714                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8715                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8716                 </fields>
8717                 <links/>
8718         </class>
8719
8720         <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">
8721                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8722                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8723                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8724                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8725                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8726                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8727                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8728                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8729                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8730                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8731                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8732                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8733                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8734                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8735                 </fields>
8736                 <links>
8737                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8738                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8739                 </links>
8740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8741             <actions>
8742                 <create permission="ADMIN_PROVIDER">
8743                     <context link="provider" field="owner"/>
8744                 </create>
8745                 <retrieve permission="ADMIN_PROVIDER">
8746                     <context link="provider" field="owner"/>
8747                 </retrieve>
8748                 <update permission="ADMIN_PROVIDER">
8749                     <context link="provider" field="owner"/>
8750                 </update>
8751                 <delete permission="ADMIN_PROVIDER">
8752                     <context link="provider" field="owner"/>
8753                 </delete>
8754             </actions>
8755         </permacrud>
8756         </class>
8757
8758         <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">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8760                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8761                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8762                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8763                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8764                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8765                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8766                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8767                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8768                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8769                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8770                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8771                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8772                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8773                 </fields>
8774                 <links>
8775                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8776                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8777                 </links>
8778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8779             <actions>
8780                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8781                     <context link="account" jump="provider" field="owner"/>
8782                 </retrieve>
8783                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8784                     <context link="account" jump="provider" field="owner"/>
8785                 </update>
8786                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8787                     <context link="account" jump="provider" field="owner"/>
8788                 </delete>
8789             </actions>
8790         </permacrud>
8791         </class>
8792
8793
8794         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8795                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8796                         <field name="id" reporter:datatype="id" />
8797                         <field name="parent" reporter:datatype="link"/>
8798                         <field name="owner" reporter:datatype="link"/>
8799                         <field name="create_time" reporter:datatype="timestamp"/>
8800                         <field name="name" reporter:datatype="text"/>
8801                         <field name="shared" reporter:datatype="bool"/>
8802                         <field name="share_with" reporter:datatype="link"/>
8803                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8804                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8805                 </fields>
8806                 <links>
8807                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8808                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8809                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8810                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8811                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8812                 </links>
8813         </class>
8814         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8815                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8816                         <field name="id" reporter:datatype="id" />
8817                         <field name="parent" reporter:datatype="link"/>
8818                         <field name="owner" reporter:datatype="link"/>
8819                         <field name="create_time" reporter:datatype="timestamp"/>
8820                         <field name="name" reporter:datatype="text"/>
8821                         <field name="shared" reporter:datatype="bool"/>
8822                         <field name="share_with" reporter:datatype="link"/>
8823                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8824                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8825                 </fields>
8826                 <links>
8827                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8828                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8829                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8830                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8831                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8832                 </links>
8833         </class>
8834         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8835                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8836                         <field name="id" reporter:datatype="id" />
8837                         <field name="parent" reporter:datatype="link"/>
8838                         <field name="owner" reporter:datatype="link"/>
8839                         <field name="create_time" reporter:datatype="timestamp"/>
8840                         <field name="name" reporter:datatype="text"/>
8841                         <field name="shared" reporter:datatype="bool"/>
8842                         <field name="share_with" reporter:datatype="link"/>
8843                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8844                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8845                 </fields>
8846                 <links>
8847                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8848                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8849                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8850                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8851                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8852                 </links>
8853         </class>
8854         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8855                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8856                         <field name="id" reporter:datatype="id" />
8857                         <field name="owner" reporter:datatype="link"/>
8858                         <field name="create_time" reporter:datatype="timestamp"/>
8859                         <field name="name" reporter:datatype="text"/>
8860                         <field name="data" reporter:datatype="text"/>
8861                         <field name="folder" reporter:datatype="link"/>
8862                         <field name="description" reporter:datatype="text"/>
8863                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8864                 </fields>
8865                 <links>
8866                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8867                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8868                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8869                 </links>
8870         </class>
8871         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8872                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8873                         <field name="id" reporter:datatype="id" />
8874                         <field name="owner" reporter:datatype="link"/>
8875                         <field name="create_time" reporter:datatype="timestamp"/>
8876                         <field name="template" reporter:datatype="link"/>
8877                         <field name="data" reporter:datatype="text"/>
8878                         <field name="folder" reporter:datatype="link"/>
8879                         <field name="recur" reporter:datatype="bool"/>
8880                         <field name="recurrence" reporter:datatype="interval"/>
8881                         <field name="name" reporter:datatype="text"/>
8882                         <field name="description" reporter:datatype="text"/>
8883                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8884                 </fields>
8885                 <links>
8886                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8887                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8888                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8889                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8890                 </links>
8891         </class>
8892         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8893                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8894                         <field name="id" reporter:datatype="id" />
8895                         <field name="runner" reporter:datatype="link"/>
8896                         <field name="start_time" reporter:datatype="timestamp"/>
8897                         <field name="complete_time" reporter:datatype="timestamp"/>
8898                         <field name="run_time" reporter:datatype="timestamp"/>
8899                         <field name="email" reporter:datatype="text"/>
8900                         <field name="excel_format" reporter:datatype="bool"/>
8901                         <field name="csv_format" reporter:datatype="bool"/>
8902                         <field name="html_format" reporter:datatype="bool"/>
8903                         <field name="error_code" reporter:datatype="int"/>
8904                         <field name="error_text" reporter:datatype="text"/>
8905                         <field name="report" reporter:datatype="link"/>
8906                         <field name="folder" reporter:datatype="link"/>
8907                         <field name="chart_pie" reporter:datatype="bool"/>
8908                         <field name="chart_bar" reporter:datatype="bool"/>
8909                         <field name="chart_line" reporter:datatype="bool"/>
8910                 </fields>
8911                 <links>
8912                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8913                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8914                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8915                 </links>
8916         </class>
8917         <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">
8918                 <fields oils_persist:primary="id">
8919                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8920                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8921                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8922                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8923                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8924                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8925                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8926                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8927                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8928                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8929                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8930                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8931                 </fields>
8932                 <links>
8933                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8934                 </links>
8935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8936                         <actions>
8937                                 <retrieve />
8938                         </actions>
8939                 </permacrud>
8940         </class>
8941         <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">
8942                 <fields oils_persist:primary="id">
8943                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8944                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8945                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8946                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8947                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8948                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8949                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8950                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8951                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8952                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8953                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8954                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8955                 </fields>
8956                 <links>
8957                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8958                 </links>
8959         </class>
8960         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8961                 <fields oils_persist:primary="id">
8962                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8963                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8964                         <field reporter:label="Fingerprint" name="fingerprint" />
8965                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8966                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8967                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8968                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8969                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8970                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8971                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8972                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8973                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8974                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8975                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8976                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8977                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8978                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8979                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8980                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8981                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8982                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8983                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8984                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8985                 </fields>
8986                 <links>
8987                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8988                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8989                 </links>
8990         </class>
8991         <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">
8992                 <fields oils_persist:primary="id">
8993                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8994                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8995                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8996                 </fields>
8997                 <links>
8998                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8999                 </links>
9000         </class>
9001         <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">
9002                 <fields oils_persist:primary="id">
9003                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9004                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9005                 </fields>
9006                 <links>
9007                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9008                 </links>
9009         </class>
9010         <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">
9011                 <fields oils_persist:primary="id">
9012                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9013                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9014                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9015                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9016                 </fields>
9017                 <links>
9018                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9019                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9020                 </links>
9021         </class>
9022         <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">
9023                 <fields oils_persist:primary="xact">
9024                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9025                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9026                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9027                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9028                 </fields>
9029                 <links>
9030                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9031                 </links>
9032         </class>
9033         <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">
9034                 <fields oils_persist:primary="xact">
9035                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9036                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9037                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9038                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9039                 </fields>
9040                 <links>
9041                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9042                 </links>
9043         </class>
9044         <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)">
9045                 <fields oils_persist:primary="id">
9046                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9047                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9048                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9049                 </fields>
9050                 <links>
9051                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9052                 </links>
9053         </class>
9054         <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">
9055                 <fields oils_persist:primary="id">
9056                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9057                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9058                 </fields>
9059                 <links>
9060                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9061                 </links>
9062         </class>
9063         <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">
9064                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9065                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9066                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9067                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9068                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9069                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9070                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9071                 </fields>
9072                 <links>
9073                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9074                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9075                 </links>
9076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9077                         <actions>
9078                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9079                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9080                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9081                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9082                         </actions>
9083                 </permacrud>
9084         </class>
9085         <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">
9086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9087                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9088                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9089                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9090                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9091                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9092                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9093                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9094                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9095                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9096                 </fields>
9097                 <links>
9098                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9099                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9100                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9101                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9102                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9103                 </links>
9104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9105                         <actions>
9106                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9107                                         <context link="formula" field="owner"/>
9108                                 </create>
9109                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9110                                         <context link="formula" field="owner"/>
9111                                 </retrieve>
9112                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9113                                         <context link="formula" field="owner"/>
9114                                 </update>
9115                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9116                                         <context link="formula" field="owner"/>
9117                                 </delete>
9118                         </actions>
9119                 </permacrud>
9120         </class>
9121
9122         <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">
9123                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9125                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9126                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9127                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9128                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9129                 </fields>
9130                 <links>
9131                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9132                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9133                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9134                 </links>
9135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9136                         <actions>
9137                                 <create permission="CREATE_PURCHASE_ORDER">
9138                                         <context link="formula" field="owner"/>
9139                 </create>
9140                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9141                                         <context link="formula" field="owner"/>
9142                 </retrieve>
9143                                 <update permission="CREATE_PURCHASE_ORDER">
9144                                         <context link="formula" field="owner"/>
9145                 </update>
9146                                 <delete permission="CREATE_PURCHASE_ORDER">
9147                                         <context link="formula" field="owner"/>
9148                 </delete>
9149                         </actions>
9150                 </permacrud>
9151         </class>
9152
9153         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9154                 <fields oils_persist:primary="id">
9155                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9156                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9157                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9158                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9159                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9160                 </fields>
9161                 <links>
9162                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9163                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9164                 </links>
9165         </class>
9166
9167         <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">
9168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9169                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9170                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9171                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9172                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9173                 </fields>
9174                 <links>
9175                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9176                 </links>
9177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9178                         <actions>
9179                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9180                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9181                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9182                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9183                         </actions>
9184                 </permacrud>
9185         </class>
9186
9187         <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">
9188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9189                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9190                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9191                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9192                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9193                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9194                 </fields>
9195                 <links>
9196                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9197                 </links>
9198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9199                         <actions>
9200                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9201                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9202                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9203                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9204                         </actions>
9205                 </permacrud>
9206         </class>
9207
9208         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9209                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9210                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9211                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9212                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9213                 </fields>
9214                 <links>
9215                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9216                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9217                 </links>
9218         </class>
9219
9220         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9221                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9222                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9223                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9224                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9225                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9226                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9227                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9228                 </fields>
9229                 <links>
9230                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9231                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9232                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9233                 </links>
9234         </class>
9235
9236         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9237                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9238                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9239                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9240                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9241                 </fields>
9242                 <links>
9243                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9244                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9245                 </links>
9246         </class>
9247
9248         <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">
9249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9250                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9251                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9252                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9253                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9254                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9255                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9256                 </fields>
9257                 <links>
9258                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9259                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9260                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9261                 </links>
9262         </class>
9263
9264         <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">
9265                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9266                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9267                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9268                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9269                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9270                 </fields>
9271                 <links>
9272                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9273                 </links>
9274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9275             <actions>
9276                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9277                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9278                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9279                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9280             </actions>
9281                 </permacrud>
9282         </class>
9283
9284         <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">
9285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9286                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9287                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9288                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9289                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9290                 </fields>
9291                 <links>
9292                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9293                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9294                 </links>
9295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9296                         <actions>
9297                                 <create permission="ADMIN_CLAIM_POLICY">
9298                                         <context link="claim_policy" field="org_unit"/>
9299                 </create>
9300                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9301                                         <context link="claim_policy" field="org_unit"/>
9302                 </retrieve>
9303                                 <update permission="ADMIN_CLAIM_POLICY">
9304                                         <context link="claim_policy" field="org_unit"/>
9305                 </update>
9306                                 <delete permission="ADMIN_CLAIM_POLICY">
9307                                         <context link="claim_policy" field="org_unit"/>
9308                 </delete>
9309                         </actions>
9310                 </permacrud>
9311         </class>
9312
9313     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9314         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9315             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9316             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9317             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9318             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9319             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9320             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9321             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9322             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9323             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9324             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9325             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9326             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9327             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9328             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9329             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9330             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9331         </fields>
9332         <links>
9333             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9334         </links>
9335     </class>
9336
9337     <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">
9338         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9339             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9340             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9341             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9342             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9343             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9344         </fields>
9345     </class>
9346
9347     <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">
9348         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9349             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9350             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9351             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9352             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9353             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9354             <field reporter:label="City" name="city" reporter:datatype="text"/>
9355             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9356             <field reporter:label="State" name="state" reporter:datatype="text"/>
9357             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9358             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9359             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9360         </fields>
9361     </class>
9362
9363     <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">
9364         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9365             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9366             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9367             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9368             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9369             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9370             <field reporter:label="City" name="city" reporter:datatype="text"/>
9371             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9372             <field reporter:label="State" name="state" reporter:datatype="text"/>
9373             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9374             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9375             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9376         </fields>
9377     </class>
9378
9379     <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">
9380         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9381             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9382             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9383             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9384             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9385             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9386             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9387         </fields>
9388     </class>
9389
9390         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9391                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9392                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9393                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9394                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9395                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9396                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9397                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9398                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9399                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9400                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9401                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9402                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9403                 </fields>
9404                 <links>
9405                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9406                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9407                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9408                 </links>
9409         </class>
9410
9411         <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">
9412                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9413                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9414                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9415                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9416                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9417                 </fields>
9418                 <links>
9419                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9420                 </links>
9421         </class>
9422
9423     <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">
9424         <fields>
9425             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9426             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9427             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9428         </fields>
9429                 <links>
9430                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9431                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9432                 </links>
9433     </class>
9434
9435     <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">
9436         <fields>
9437             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9438             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9439         </fields>
9440                 <links>
9441                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9442                 </links>
9443     </class>
9444
9445     <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">
9446         <fields>
9447             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9448             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9449             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9450         </fields>
9451                 <links>
9452                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9453                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9454                 </links>
9455     </class>
9456
9457     <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">
9458         <fields>
9459             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9460             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9461         </fields>
9462                 <links>
9463                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9464                 </links>
9465     </class>
9466
9467     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9468                 <oils_persist:source_definition>
9469
9470             SELECT  DISTINCT l.*
9471               FROM  action.unfulfilled_hold_loops l
9472                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9473               WHERE l.count = m.max
9474
9475                 </oils_persist:source_definition>
9476         <fields>
9477             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9478             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9479             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9480         </fields>
9481                 <links>
9482                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9483                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9484                 </links>
9485     </class>
9486
9487         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9488                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9489                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9490                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9491                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9492                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9493                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9494                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9495                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9496                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9497                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9498                 </fields>
9499                 <links>
9500                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9501                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9502                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9503                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9504                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9505                 </links>
9506         </class>
9507
9508         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9509                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9510                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9511                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9513                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9514                 </fields>
9515                 <links>
9516                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9517                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9518                 </links>
9519         </class>
9520
9521         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9522                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9523                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9524                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9525                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9526                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9527                 </fields>
9528                 <links>
9529                 </links>
9530         </class>
9531
9532         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9533                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9534                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9535                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9536                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9537                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9538                 </fields>
9539                 <links>
9540                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9541                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9542                 </links>
9543         </class>
9544         
9545         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9546                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9547                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9548                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9549                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9550                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9551                 </fields>
9552                 <links>
9553                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9554                 </links>
9555         </class>
9556         
9557         <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">
9558                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9559                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9560                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9561                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9562                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9563                 </fields>
9564                 <links>
9565                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9566                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9567                 </links>
9568         </class>
9569
9570         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9571                 <fields oils_persist:primary="name">
9572                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9573                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9574                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9575                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9576                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9577                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9578                 </fields>
9579                 <links>
9580                 </links>
9581         </class>
9582
9583         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9584                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9585                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9586                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9587                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9588                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9589                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9590                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9591                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9592                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9593                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9594                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9595                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9596                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9597                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9598                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9599                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9600                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9601                 </fields>
9602                 <links>
9603                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9604                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9605                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9606                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9607                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9608                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9609                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9610                 </links>
9611         </class>
9612
9613         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9614                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9615                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9616                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9617                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9618                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9619                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9620                 </fields>
9621                 <links>
9622                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9623                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9624                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9625                 </links>
9626         </class>
9627
9628         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9629                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9630                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9631                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9632                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9633                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9634                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9635                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9636                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9637                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9638                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9639                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9640                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9641                 </fields>
9642                 <links>
9643                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9644                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9645                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9646                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9647                 </links>
9648         </class>
9649
9650         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9651                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9652                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9653                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9654                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9655                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9656                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9657                 </fields>
9658                 <links>
9659                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9660                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9661                 </links>
9662         </class>
9663
9664         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9665                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9666                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9667                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9668                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9669                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9670                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9671                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9672                 </fields>
9673                 <links>
9674                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9675                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9676                 </links>
9677         </class>
9678
9679         <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">
9680                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9681                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9682                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9683                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9684                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9685                 </fields>
9686                 <links>
9687                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9688                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9689                 </links>
9690         </class>
9691
9692         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9693                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9694                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9695                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9696                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9697                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9698                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9699                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9700                 </fields>
9701                 <links>
9702                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9703                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9704                 </links>
9705         </class>
9706
9707         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9708                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9709                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9710                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9711                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9712                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9713                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9714                 </fields>
9715                 <links>
9716                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9717                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9718                 </links>
9719         </class>
9720
9721         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9722                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9723                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9724                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9725                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9726                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9727                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9728                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9729                 </fields>
9730                 <links>
9731                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9732                 </links>
9733         </class>
9734
9735         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9736                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9737                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9738                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9739                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9740                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9741                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9742                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9743                 </fields>
9744                 <links>
9745                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9746                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9747                 </links>
9748         </class>
9749
9750         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9751                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9752                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9753                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9754                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9755                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9756                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9757                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9758                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9759                 </fields>
9760                 <links>
9761                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9762                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9763                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9764                 </links>
9765         </class>
9766
9767         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9768                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9769                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9770                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9771                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9772                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9773                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9774                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9775                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9776                 </fields>
9777                 <links>
9778                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9779                 </links>
9780         </class>
9781
9782         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9783                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9784                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9785                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9786                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9787                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9788                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9789                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9790                 </fields>
9791                 <links>
9792                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9793                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9794                 </links>
9795         </class>
9796
9797         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9798                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9799                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9800                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9801                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9802                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9803                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9804                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9805                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9806                 </fields>
9807                 <links>
9808                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9809                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9810                 </links>
9811         </class>
9812
9813         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9814                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9815                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9816                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9817                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9818                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9819                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9820                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9821                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9822                 </fields>
9823                 <links>
9824                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9825                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9826                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9827                 </links>
9828         </class>
9829
9830         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9831                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9832                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9833                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9834                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9835                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9836                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9837                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9838                 </fields>
9839                 <links>
9840                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9841                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9842                 </links>
9843         </class>
9844
9845         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9846                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9847                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9848                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9849                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9850                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9851                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9852                 </fields>
9853                 <links>
9854                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9855                 </links>
9856         </class>
9857
9858         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9859                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9860                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9861                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9862                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9863                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9864                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9865                 </fields>
9866                 <links>
9867                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9868                 </links>
9869         </class>
9870
9871         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9872                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9873                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9874                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9875                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9876                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9877                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9878                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9879                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9880                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9881                 </fields>
9882                 <links>
9883                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9884                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9885                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9886                 </links>
9887         </class>
9888
9889         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9890                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9891                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9892                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9893                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9894                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9895                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9896                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9897                 </fields>
9898                 <links>
9899                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9900                 </links>
9901         </class>
9902
9903         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9904                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9905                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9906                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9907                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9909                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9910                 </fields>
9911                 <links>
9912                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9913                 </links>
9914         </class>
9915
9916         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9917                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9918                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9919                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9920                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9921                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9922                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9923                 </fields>
9924                 <links>
9925                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9926                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9927                 </links>
9928         </class>
9929
9930         <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">
9931                 <fields oils_persist:primary="id">
9932                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9933                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9934                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9935                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9936                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9937                 </fields>
9938                 <links>
9939                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9940                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9941                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9942                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9943                 </links>
9944         </class>
9945
9946         <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">
9947                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9948                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9949                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9950                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9951                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9952                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9953                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9954                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9955                 </fields>
9956                 <links/>
9957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9958                         <actions>
9959                                 <retrieve/>
9960                         </actions>
9961                 </permacrud>
9962         </class>
9963
9964         <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">
9965                 <fields oils_persist:primary="ptype_key">
9966                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9967                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9968                 </fields>
9969                 <links/>
9970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9971                         <actions>
9972                                 <retrieve/>
9973                         </actions>
9974                 </permacrud>
9975         </class>
9976
9977         <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">
9978                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9979                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9980                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9981                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9982                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9983                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9984                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9985                 </fields>
9986                 <links>
9987                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9988                 </links>
9989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9990                         <actions>
9991                                 <retrieve/>
9992                         </actions>
9993                 </permacrud>
9994         </class>
9995
9996         <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">
9997                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9998                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9999                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10000                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10001                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10002                 </fields>
10003                 <links>
10004                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10005                 </links>
10006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10007                         <actions>
10008                                 <retrieve/>
10009                         </actions>
10010                 </permacrud>
10011         </class>
10012
10013     <class
10014         id="uvs"
10015         controller="open-ils.cstore open-ils.pcrud"
10016         oils_obj:fieldmapper="url_verify::session"
10017         oils_persist:tablename="url_verify.session"
10018         reporter:label="URL Verification Session"
10019     >
10020         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10021             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10022             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10023                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10024             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10025             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10026             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10027             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10028             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10029             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10030         </fields>
10031
10032         <links>
10033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10034             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10035             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10036             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10037             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10038         </links>
10039
10040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10041             <actions>
10042                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10043             </actions>
10044         </permacrud>
10045
10046     </class>
10047
10048     <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">
10049         <oils_persist:source_definition>
10050             SELECT
10051                 cbrebi.id AS id,  -- so we can have a pkey in our view
10052                 uvs.id AS session,
10053                 uvs.owning_lib,
10054                 cbrebi.target_biblio_record_entry
10055             FROM url_verify.session uvs
10056             JOIN container.biblio_record_entry_bucket cbreb
10057                 ON (uvs.container = cbreb.id)
10058             JOIN container.biblio_record_entry_bucket_item cbrebi
10059                 ON (cbrebi.bucket = cbreb.id)
10060         </oils_persist:source_definition>
10061         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10062             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10063             <field reporter:label="Session" name="session" reporter:datatype="link" />
10064             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10065             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10066         </fields>
10067         <links>
10068             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10069             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10070             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10071         </links>
10072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10073             <actions>
10074                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10075             </actions>
10076         </permacrud>
10077     </class>
10078
10079     <class
10080         id="uvus"
10081         controller="open-ils.cstore open-ils.pcrud"
10082         oils_obj:fieldmapper="url_verify::url_selector"
10083         oils_persist:tablename="url_verify.url_selector"
10084         reporter:label="URL Verification URL Selector"
10085     >
10086         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10087             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10088             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10089                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10090             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10091         </fields>
10092
10093         <links>
10094             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10095             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10096         </links>
10097
10098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10099             <actions>
10100                 <create permission="URL_VERIFY">
10101                     <context link="session" field="owning_lib"/>
10102                 </create>
10103                 <retrieve permission="URL_VERIFY">
10104                     <context link="session" field="owning_lib"/>
10105                 </retrieve>
10106                 <update permission="URL_VERIFY">
10107                     <context link="session" field="owning_lib"/>
10108                 </update>
10109                 <delete permission="URL_VERIFY">
10110                     <context link="session" field="owning_lib"/>
10111                 </delete>
10112             </actions>
10113         </permacrud>
10114
10115     </class>
10116
10117     <class
10118         id="uvu"
10119         controller="open-ils.cstore open-ils.pcrud"
10120         oils_obj:fieldmapper="url_verify::url"
10121         oils_persist:tablename="url_verify.url"
10122         reporter:label="URL Verification URL"
10123     >
10124         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10125             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10126                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10127                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10128                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10129                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10130             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10131             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10132             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10133             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10134             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10135             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10136             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10137             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10138             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10139             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10140             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10141             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10142             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10143         </fields>
10144
10145         <links>
10146             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10147             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10148             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10149             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10150             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10151         </links>
10152
10153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10154             <actions>
10155                 <create permission="URL_VERIFY">
10156                     <context link="session" field="owning_lib"/>
10157                 </create>
10158                 <retrieve permission="URL_VERIFY">
10159                     <context link="session" field="owning_lib"/>
10160                 </retrieve>
10161                 <update permission="URL_VERIFY">
10162                     <context link="session" field="owning_lib"/>
10163                 </update>
10164                 <delete permission="URL_VERIFY">
10165                     <context link="session" field="owning_lib"/>
10166                 </delete>
10167             </actions>
10168         </permacrud>
10169
10170     </class>
10171
10172     <class
10173         id="uvva"
10174         controller="open-ils.cstore open-ils.pcrud"
10175         oils_obj:fieldmapper="url_verify::verification_attempt"
10176         oils_persist:tablename="url_verify.verification_attempt"
10177         reporter:label="URL Verification Attempt"
10178     >
10179         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10180             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10181                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10182                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10183             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10184             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10185         </fields>
10186
10187         <links>
10188             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10189             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10190         </links>
10191
10192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10193             <actions>
10194                 <create permission="URL_VERIFY">
10195                     <context link="session" field="owning_lib"/>
10196                 </create>
10197                 <retrieve permission="URL_VERIFY">
10198                     <context link="session" field="owning_lib"/>
10199                 </retrieve>
10200                 <update permission="URL_VERIFY">
10201                     <context link="session" field="owning_lib"/>
10202                 </update>
10203                 <delete permission="URL_VERIFY">
10204                     <context link="session" field="owning_lib"/>
10205                 </delete>
10206             </actions>
10207         </permacrud>
10208
10209     </class>
10210
10211     <class
10212         id="uvuv"
10213         controller="open-ils.cstore open-ils.pcrud"
10214         oils_obj:fieldmapper="url_verify::url_verification"
10215         oils_persist:tablename="url_verify.url_verification"
10216         reporter:label="URL Verification"
10217     >
10218         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10219             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10220                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10221                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10222             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10223             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10224             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10225             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10226                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10227         </fields>
10228
10229         <links>
10230             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10231             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10232             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10233         </links>
10234
10235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10236             <actions>
10237                 <create permission="URL_VERIFY">
10238                     <context link="attempt" jump="session" field="owning_lib"/>
10239                 </create>
10240                 <retrieve permission="URL_VERIFY">
10241                     <context link="attempt" jump="session" field="owning_lib"/>
10242                 </retrieve>
10243                 <update permission="URL_VERIFY">
10244                     <context link="attempt" jump="session" field="owning_lib"/>
10245                 </update>
10246                 <delete permission="URL_VERIFY">
10247                     <context link="attempt" jump="session" field="owning_lib"/>
10248                 </delete>
10249             </actions>
10250         </permacrud>
10251
10252     </class>
10253
10254         <class
10255                 id="cfdi"
10256                 controller="open-ils.cstore open-ils.pcrud"
10257                 oils_obj:fieldmapper="config::filter_dialog_interface"
10258                 oils_persist:tablename="config.filter_dialog_interface"
10259                 reporter:label="FilterDialog Interface">
10260                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10261                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10262                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10263                 </fields>
10264                 <links>
10265                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10266                 </links>
10267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10268                         <actions>
10269                                 <retrieve />
10270                         </actions>
10271                 </permacrud>
10272         </class>
10273
10274         <class
10275                 id="cfdfs"
10276                 controller="open-ils.cstore open-ils.pcrud"
10277                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10278                 oils_persist:tablename="config.filter_dialog_filter_set"
10279                 reporter:label="FilterDialog Filter Set">
10280                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10281                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10282                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10283                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10284                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10285                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10286                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10287                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10288                 </fields>
10289                 <links>
10290                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10291                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10292                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10293                 </links>
10294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10295                         <actions>
10296                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10297                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10298                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10299                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10300                         </actions>
10301                 </permacrud>
10302
10303         </class>
10304
10305         <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">
10306                 <fields oils_persist:primary="code">
10307                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10308                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10309                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10310                 </fields>
10311                 <links/>
10312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10313                         <actions>
10314                                 <retrieve/>
10315                         </actions>
10316                 </permacrud>
10317         </class>
10318
10319         <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">
10320                 <oils_persist:source_definition>
10321
10322             SELECT  b.id,
10323                     MAX(dcp.edit_date) AS last_delete_date
10324              FROM   biblio.record_entry b
10325                     JOIN asset.call_number cn ON (cn.record = b.id)
10326                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10327              WHERE  NOT b.deleted
10328              GROUP BY b.id
10329              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10330
10331                 </oils_persist:source_definition>
10332                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10333                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10334                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10335                 </fields>
10336                 <links>
10337                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10338                 </links>
10339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10340                         <actions>
10341                                 <retrieve/>
10342                         </actions>
10343                 </permacrud>
10344         </class>
10345
10346         <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">
10347                 <oils_persist:source_definition>
10348
10349             -- -- 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.
10350             -- -- 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
10351             -- -- may not.
10352             -- SELECT
10353             --     bre.id AS "bib_id",
10354             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10355             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10356             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10357             -- FROM (
10358                 SELECT
10359                     y.bre AS "id",
10360                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10361                     y.hold_count AS "hold_count",
10362                     (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"
10363                 FROM (
10364                         SELECT
10365                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10366                             COUNT(*) AS "hold_count"
10367                         FROM action.hold_request h
10368                         WHERE
10369                             cancel_time IS NULL
10370                             AND fulfillment_time IS NULL
10371                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10372                         GROUP BY 1
10373                     )y LEFT JOIN (
10374                         SELECT 
10375                             (SELECT id
10376                                 FROM biblio.record_entry 
10377                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10378                             ) AS "bre", 
10379                             COUNT(*) AS "copy_count"
10380                         FROM asset.copy
10381                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10382                         WHERE copy.holdable 
10383                             AND NOT copy.deleted 
10384                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10385                         GROUP BY 1
10386                     )x ON x.bre = y.bre
10387                 -- )z RIGHT JOIN (
10388                 --     SELECT id
10389                 --     FROM biblio.record_entry
10390                 --     WHERE NOT deleted
10391                 -- )bre ON (z.bib_id = bre.id)
10392                 
10393
10394                 </oils_persist:source_definition>
10395                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10396                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10397                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10398                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10399                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10400                 </fields>
10401                 <links>
10402                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10403                 </links>
10404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10405                         <actions>
10406                                 <retrieve/>
10407                         </actions>
10408                 </permacrud>
10409         </class>
10410
10411         <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">
10412                 <oils_persist:source_definition>
10413             SELECT *,
10414                 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,
10415                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10416             FROM
10417                 (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
10418                     FROM
10419                         action.hold_request ahr
10420                         JOIN reporter.hold_request_record rhrr USING (id)
10421                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10422                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10423                     WHERE
10424                         ahr.cancel_time IS NULL
10425                         AND ahr.fulfillment_time IS NULL
10426                     GROUP BY bib_record, pickup_lib
10427                 )x
10428                 JOIN
10429                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10430                     FROM
10431                         action.hold_request ahr
10432                         JOIN reporter.hold_request_record rhrr USING (id)
10433                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10434                     WHERE
10435                         ahr.cancel_time IS NULL
10436                         AND ahr.fulfillment_time IS NULL
10437                     GROUP BY bib_record
10438                 )y
10439                 USING (id)
10440                 </oils_persist:source_definition>
10441                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10442                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10443                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10444                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10445                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10446                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10447                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10448                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10449                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10450                 </fields>
10451                 <links>
10452                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10453                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10454                 </links>
10455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10456                         <actions>
10457                                 <retrieve/>
10458                         </actions>
10459                 </permacrud>
10460         </class>
10461
10462         <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">
10463                 <oils_persist:source_definition>
10464             SELECT
10465                 ac.id,
10466                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10467                 MAX(actac.xact_start) AS last_circ
10468             FROM asset.copy ac
10469                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10470             GROUP BY ac.id
10471
10472             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10473             --SELECT
10474             --    ac.id,
10475             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10476             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10477             --FROM asset.copy ac
10478             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10479             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10480             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10481                 </oils_persist:source_definition>
10482                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10483                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10484                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10485                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10486                 </fields>
10487                 <links>
10488                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10489                 </links>
10490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10491                         <actions>
10492                                 <retrieve/>
10493                         </actions>
10494                 </permacrud>
10495         </class>
10496
10497         <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">
10498                 <fields oils_persist:primary="id">
10499                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10500                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10501                 </fields>
10502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10503                         <actions>
10504                                 <retrieve/>
10505                         </actions>
10506                 </permacrud>
10507         </class>
10508
10509         <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">
10510                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10511                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10512                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10513                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10514                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10515                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10516                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10517                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10518                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10519                 </fields>
10520                 <links>
10521                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10522                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10523                 </links>
10524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10525                         <actions>
10526                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10527                                 <retrieve/>
10528                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10529                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10530                         </actions>
10531                 </permacrud>
10532         </class>
10533
10534         <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">
10535                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10536                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10537                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10538                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10539                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10540                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10541                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10542                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10543                 </fields>
10544                 <links>
10545                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10546                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10547                 </links>
10548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10549                         <actions>
10550                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10551                                 <retrieve/>
10552                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10553                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10554                         </actions>
10555                 </permacrud>
10556         </class>
10557
10558
10559         <!-- ********************************************************************************************************************* -->
10560         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10561         <!-- ********************************************************************************************************************* -->
10562         <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">
10563                 <fields oils_persist:primary="id">
10564                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10565                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10566                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10567                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10568                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10569                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10570                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10571                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10572                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10573                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10574                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10575                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10576                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10577                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10578                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10579                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10580                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10581                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10582                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10583                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10584                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10585                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10586                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10587                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10588                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10589                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10590                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10591                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10592                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10593                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10594                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10595                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10596                 </fields>
10597                 <links>
10598                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10599                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10600                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10601                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10602                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10603                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10604                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10605                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10606                 </links>
10607         </class>
10608
10609         <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">
10610                 <fields oils_persist:primary="id">
10611                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10612                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10613                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10614                 </fields>
10615                 <links>
10616                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10617                 </links>
10618         </class>
10619
10620         <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">
10621                 <fields oils_persist:primary="id">
10622                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10623                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10624                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10625                 </fields>
10626                 <links>
10627                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10628                 </links>
10629         </class>
10630
10631         <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">
10632                 <fields oils_persist:primary="id">
10633                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10634
10635                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10636                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10637                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10638
10639                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10640                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10641                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10642
10643                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10644                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10645
10646                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10647                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10648                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10649
10650                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10651                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10652
10653                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10654                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10655                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10656
10657                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10658                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10659                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10660
10661                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10662                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10663                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10664                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10665
10666                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10667                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10668
10669                 </fields>
10670                 <links>
10671                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10672                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10673                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10674                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10675                 </links>
10676         </class>
10677
10678         <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">
10679                 <oils_persist:source_definition>
10680
10681             SELECT
10682                 po.ordering_agency AS ordering_agency,
10683                 po.id AS purchase_order,
10684                 li.id AS lineitem,
10685                 lid.id AS lineitem_detail,
10686                 cpa.id AS claim_policy_action
10687             FROM
10688                 acq.lineitem_detail lid
10689                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10690                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10691                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10692                 JOIN acq.claim_policy_action cpa ON (
10693                     cpa.claim_policy = cp.id
10694
10695                     -- we only care about claim policy actions whose claim
10696                     -- interval we'd reached or exceeded
10697                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10698
10699                     -- filter out all claim policy actions where claim events
10700                     -- have occurred on or after the action's action_interval
10701                     AND NOT EXISTS (
10702                         SELECT 1
10703                         FROM
10704                             acq.claim_event evt
10705                             JOIN acq.claim claim ON (
10706                                 claim.id = evt.claim
10707                                 AND claim.lineitem_detail = lid.id
10708                             )
10709                         WHERE
10710                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10711                     )
10712                 )
10713             WHERE
10714                 lid.cancel_reason IS NULL
10715                 AND li.cancel_reason IS NULL -- belt/suspenders
10716                 AND po.cancel_reason IS NULL -- belt/suspenders
10717                 AND lid.recv_time IS NULL
10718                 AND po.state = 'on-order'
10719             ORDER BY 1, 2, 3, 4, 5
10720
10721                 </oils_persist:source_definition>
10722                 <fields>
10723                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10724                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10725                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10726                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10727                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10728                 </fields>
10729                 <links>
10730                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10731                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10732                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10733                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10734                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10735                 </links>
10736         </class>
10737         <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">
10738                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10739                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10740                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10741                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10742                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10743                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10744                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10745                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10746                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10747                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10748                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10749                 </fields>
10750                 <links>
10751                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10752                 </links>
10753     </class>
10754         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10755                 <oils_persist:source_definition>
10756             SELECT * FROM acq.lineitem_summary 
10757                                 WHERE item_count > (invoice_count + cancel_count)
10758         </oils_persist:source_definition>
10759                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10760                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10761                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10762                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10763                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10764                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10765                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10766                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10767                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10768                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10769                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10770                 </fields>
10771                 <links>
10772                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10773                 </links>
10774     </class>
10775         <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">
10776                 <oils_persist:source_definition>
10777
10778                         SELECT  t.*
10779                           FROM  action.transit_copy t
10780                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10781                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10782                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10783
10784                 </oils_persist:source_definition>
10785                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10786                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10787                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10788                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10789                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10790                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10791                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10792                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10793                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10794                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10795                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10796                 </fields>
10797                 <links>
10798                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10799                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10800                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10801                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10802                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10803                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10804                 </links>
10805         </class>
10806
10807     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10808                 <oils_persist:source_definition>
10809
10810         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10811                 SELECT
10812                         cp.id as copy,
10813                         COUNT(circ.id),
10814                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10815                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10816                 FROM
10817                         asset.copy cp
10818                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10819                 GROUP BY 1, 3, 4
10820                 UNION ALL
10821                 SELECT
10822                         cp.id as copy,
10823                         COUNT(circ.id),
10824                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10825                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10826                 FROM
10827                         asset.copy cp
10828                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10829                 GROUP BY 1, 3, 4
10830                 UNION ALL
10831                 SELECT
10832                         id as copy,
10833                         circ_count,
10834                         -1 AS year,
10835                         false as is_renewal
10836                 FROM
10837                         extend_reporter.legacy_circ_count
10838         )x GROUP BY 1, 3, 4
10839
10840                 </oils_persist:source_definition>
10841         <fields>
10842             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10843             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10844             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10845             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10846         </fields>
10847                 <links>
10848                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10849                 </links>
10850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10851                         <actions>
10852                                 <retrieve/>
10853                         </actions>
10854                 </permacrud>
10855     </class>
10856
10857         <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">
10858                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10859                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10860                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10861                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10862                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10863                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10864                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10865                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10866                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10867                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10868                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10869                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10870                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10871                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10872                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10873                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10874                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10875                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10876                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10877                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10878                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10879                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10880                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10881                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10882                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10883                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10884                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10885                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10886                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10887                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10888                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10889                 </fields>
10890                 <links>
10891                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10892                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10893                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10894                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10895                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10897                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10898                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10899                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10900                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10901                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10902                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10903                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10904                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10905                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10906                 </links>
10907         </class>
10908
10909     <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">
10910         <fields oils_persist:primary="id">
10911             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10912             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10913             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10914             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10915             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10916             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10917             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10918             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10919             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10920             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10921             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10922             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10923             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
10924             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
10925             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10926             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10927             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10928             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10929             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10930             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10931             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10932             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10933             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10934             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10935             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10936             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10937             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10938             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10939             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10940             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10941             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10942             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10943             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10944             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10945         </fields>
10946         <links>
10947             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10948             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10949             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10950             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10951             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10952             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10953             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
10954             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
10955         </links>
10956     </class>
10957
10958     <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">
10959         <fields oils_persist:primary="id">
10960             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10961             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10962             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10963             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10964         </fields>
10965         <links>
10966             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10967             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10968         </links>
10969     </class>
10970
10971     <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">
10972         <fields oils_persist:primary="owning_lib">
10973             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10974             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10975             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10976         </fields>
10977         <links>
10978             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10979         </links>
10980     </class>
10981
10982     <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">
10983         <fields oils_persist:primary="id">
10984             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10985             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10986             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10987             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10988             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10989         </fields>
10990         <links>
10991             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10992             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10993             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10994         </links>
10995     </class>
10996
10997     <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">
10998         <fields oils_persist:primary="circ_lib">
10999             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11000             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11001             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11002             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11003         </fields>
11004         <links>
11005             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11006             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11007         </links>
11008     </class>
11009
11010     <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">
11011         <fields oils_persist:primary="id">
11012             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11013             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11014             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11015             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11016             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11017         </fields>
11018         <links>
11019             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11020             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11021             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11022         </links>
11023     </class>
11024
11025     <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">
11026         <fields oils_persist:primary="home_ou">
11027             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11028             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11029             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11030             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11031         </fields>
11032         <links>
11033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11034             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11035         </links>
11036     </class>
11037         <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">
11038                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11039                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11040                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11041                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11042                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11043                 </fields>
11044                 <links>
11045                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11046                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11047                 </links>
11048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11049                         <actions>
11050                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11051                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11052                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11053                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11054                         </actions>
11055                 </permacrud>
11056         </class>
11057         <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">
11058                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11059                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11060                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11061                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11062                 </fields>
11063                 <links>
11064                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11065                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11066                         </links>
11067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11068                 <actions>
11069                                 <create permission="ADMIN_ACQ_FUND_TAG">
11070                                         <context link="tag" field="owner"/>
11071                                 </create>
11072                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11073                                         <context link="tag" field="owner"/>
11074                                 </retrieve>
11075                                 <update permission="ADMIN_ACQ_FUND_TAG">
11076                                         <context link="tag" field="owner"/>
11077                                 </update>
11078                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11079                                         <context link="tag" field="owner"/>
11080                                 </delete>
11081                         </actions>
11082                 </permacrud>
11083         </class>
11084         <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">
11085                 <oils_persist:source_definition><![CDATA[
11086                 SELECT
11087                         poi.purchase_order AS purchase_order,
11088                         ii.invoice AS invoice,
11089                         NULL AS lineitem,
11090                         poi.id AS po_item,
11091                         NULL AS picklist
11092                 FROM
11093                         acq.po_item poi
11094                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11095                 UNION SELECT
11096                         jub.purchase_order AS purchase_order,
11097                         ie.invoice AS invoice,
11098                         jub.id AS lineitem,
11099                         NULL AS po_item,
11100                         jub.picklist AS picklist
11101                 FROM
11102                         acq.lineitem jub
11103                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11104                 UNION SELECT
11105                         ii.purchase_order AS purchase_order,
11106                         ii.invoice AS invoice,
11107                         NULL AS lineitem,
11108                         NULL AS po_item,
11109                         NULL AS picklist
11110                 FROM
11111                         acq.invoice_item ii
11112                 WHERE ii.po_item IS NULL
11113                 UNION SELECT
11114                         ie.purchase_order AS purchase_order,
11115                         ie.invoice AS invoice,
11116                         NULL AS lineitem,
11117                         NULL AS po_item,
11118                         NULL AS picklist
11119                 FROM
11120                         acq.invoice_entry ie
11121                 WHERE ie.lineitem IS NULL
11122                 UNION SELECT
11123                         NULL AS purchase_order,
11124                         NULL AS invoice,
11125                         jub.id AS lineitem,
11126                         NULL AS po_item,
11127                         jub.picklist AS picklist
11128                 FROM
11129                         acq.lineitem jub
11130                 WHERE jub.purchase_order IS NULL
11131                 ]]></oils_persist:source_definition>
11132                 <fields>
11133                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11134                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11135                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11136                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11137                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11138                 </fields>
11139                 <links>
11140                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11141                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11142                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11143                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11144                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11145                 </links>
11146         </class>
11147         <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">
11148                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11149                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11150                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11151                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11152                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11153                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11154                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11155                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11156                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11157                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11158                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11159                 </fields>
11160                 <links>
11161                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11162                 </links>
11163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11164                         <actions>
11165                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11166                                 <retrieve/>
11167                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11168                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11169                         </actions>
11170                 </permacrud>
11171         </class>
11172
11173         <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">
11174                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11175                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11176                         <field name="date_applied" reporter:datatype="timestamp"/>
11177                         <field name="org" reporter:datatype="org_unit"/>
11178                         <field name="original_value" reporter:datatype="text"/>
11179                         <field name="new_value" reporter:datatype="text"/>
11180                         <field name="field_name" reporter:datatype="link"/>
11181                 </fields>
11182                 <links>
11183                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11184                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11185                 </links>
11186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11187                         <actions>
11188                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11189                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11190                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11191                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11192                         </actions>
11193                 </permacrud>
11194         </class>
11195         <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">
11196                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11198                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11199                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11200                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11201                 </fields>
11202                 <links>
11203                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11204                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11205                 </links>
11206         </class>
11207         <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">
11208                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11209                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11210                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11211                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11212                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11213                 </fields>
11214                 <links>
11215                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11216                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11217                 </links>
11218         </class>
11219         <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">
11220                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11221                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11222                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11223                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11224                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11225                 </fields>
11226                 <links>
11227                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11228                 </links>
11229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11230                         <actions>
11231                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11232                                 <retrieve/>
11233                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11234                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11235                         </actions>
11236                 </permacrud>
11237         </class>
11238         <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">
11239                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11241                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11242                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11243                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11244                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11245                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11246                 </fields>
11247                 <links>
11248                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11249                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11250                 </links>
11251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11252                         <actions>
11253                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11254                                 <retrieve/>
11255                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11256                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11257                         </actions>
11258                 </permacrud>
11259         </class>
11260
11261         <!-- ********************************************************************************************************************* -->
11262
11263 </IDL>
11264
11265 <!--
11266     vim:noet:ts=4:sw=4:
11267 -->