]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Enable pcrud access to fiscal year / fiscal calendar
[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
24 <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">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <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">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <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">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <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">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
214                 </fields>
215                 <links>
216                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
217                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
218                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
219                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
220                 </links>
221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
222                         <actions>
223                                 <create permission="CREATE_IMPORT_ITEM">
224                     <context link="definition" field="owner"/>
225                                 </create>
226                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
227                     <context link="definition" field="owner"/>
228                                 </retrieve>
229                                 <update permission="UPDATE_IMPORT_ITEM">
230                     <context link="definition" field="owner"/>
231                                 </update>
232                                 <delete permission="DELETE_IMPORT_ITEM">
233                     <context link="definition" field="owner"/>
234                                 </delete>
235                         </actions>
236                 </permacrud>
237         </class>
238
239         <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">
240                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
241                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
242                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
243                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
244                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
245                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
246                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
247                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
248                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
249                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
250                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
251                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
252                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
253                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
254                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
255                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
256                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
257                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
258                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
259                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
260                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
261                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
262                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
263                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
264                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
265                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
266                 </fields>
267                 <links>
268                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
269                 </links>
270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
271                         <actions>
272                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <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"/>
274                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
275                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
276                         </actions>
277                 </permacrud>
278         </class>
279
280         <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">
281                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
282                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
283                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
284                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
285                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
286                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
287                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
288                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
289                 </fields>
290                 <links>
291                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
292                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
293                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
294                 </links>
295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
296                         <actions>
297                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
300                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
301                         </actions>
302                 </permacrud>
303         </class>
304
305         <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">
306                 <fields oils_persist:primary="code">
307                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
309                 </fields>
310                 <links>
311                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
312                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
313                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
314                 </links>
315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
316                         <actions>
317                                 <retrieve/>
318                         </actions>
319                 </permacrud>
320         </class>
321
322         <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">
323                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
324                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
325                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
326                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
327                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
328                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
329                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
330                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
331                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
332                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
333                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
334                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
336                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
337                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
338                 </fields>
339                 <links>
340                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
341                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
342                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
343                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
344             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
345             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
346             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
347                 </links>
348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
349                         <actions>
350                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
353                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
354                         </actions>
355                 </permacrud>
356         </class>
357
358         <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">
359                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
360                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
361                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
362                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
363                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
364                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
365                 </fields>
366                 <links/>
367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
368                         <actions>
369                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
370                 <retrieve/>
371                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
372                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
373                         </actions>
374                 </permacrud>
375         </class>
376
377         <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">
378                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
379                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
380                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
381                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
382                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
383                 </fields>
384                 <links>
385                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
386                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
387                 </links>
388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
389                         <actions>
390                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
393                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
394                         </actions>
395                 </permacrud>
396         </class>
397
398         <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">
399                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
400                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
401                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
402                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
403                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
404                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
405                 </fields>
406                 <links>
407                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
408                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
409                 </links>
410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
411                         <actions>
412                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
415                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <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">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
422                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
426                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
427                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
428                 </fields>
429                 <links>
430                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
431                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
432                 </links>
433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
434                         <actions>
435                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
438                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
439                         </actions>
440                 </permacrud>
441         </class>
442
443         <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">
444                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
445                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
446                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
447                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
448                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
449                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
450                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
451                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
452                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
453                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
454                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
455                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
456                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
457                 </fields>
458                 <links>
459                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
460                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
461                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
462             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
463             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
464                 </links>
465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
466                         <actions>
467                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                         </actions>
472                 </permacrud>
473         </class>
474
475         <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">
476                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
477                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
479                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
480                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
481                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
482                 </fields>
483                 <links/>
484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
485                         <actions>
486                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                 <retrieve/>
488                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
489                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
490                         </actions>
491                 </permacrud>
492         </class>
493
494         <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">
495                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
496                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
497                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
498                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
499                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
500                 </fields>
501                 <links>
502                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
503                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
504                 </links>
505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
506                         <actions>
507                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
510                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
511                         </actions>
512                 </permacrud>
513         </class>
514
515         <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">
516                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
517                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
518                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
519                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
520                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
521                 </fields>
522                 <links>
523                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
524                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
525                 </links>
526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
527                         <actions>
528                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
531                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
532                         </actions>
533                 </permacrud>
534         </class>
535
536         <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">
537                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
538                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
539                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
540                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
541                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
542                 </fields>
543                 <links>
544                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
545                 </links>
546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
547                         <actions>
548                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
550                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
551                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
552                         </actions>
553                 </permacrud>
554         </class>
555
556         <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">
557                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
558                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
559                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
560                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
561                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
562                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
563                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
564                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
565             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
566                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
567                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
568                 </fields>
569                 <links>
570                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
571                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
572                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
573                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
574                 </links>
575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
576                         <actions>
577                                 <create permission="ADMIN_IMPORT_MATCH_SET">
578                     <context link="match_set" field="owner"/>
579                                 </create>
580                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
581                     <context link="match_set" field="owner"/>
582                                 </retrieve>
583                                 <update permission="ADMIN_IMPORT_MATCH_SET">
584                     <context link="match_set" field="owner"/>
585                                 </update>
586                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
587                     <context link="match_set" field="owner"/>
588                                 </delete>
589                         </actions>
590                 </permacrud>
591         </class>
592
593         <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">
594                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
595                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
596                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
597                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
598                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
599                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
600                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
601                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
602                 </fields>
603                 <links>
604                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
605                 </links>
606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
607                         <actions>
608                                 <create permission="ADMIN_IMPORT_MATCH_SET">
609                     <context link="match_set" field="owner"/>
610                                 </create>
611                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
612                     <context link="match_set" field="owner"/>
613                                 </retrieve>
614                                 <update permission="ADMIN_IMPORT_MATCH_SET">
615                     <context link="match_set" field="owner"/>
616                                 </update>
617                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
618                     <context link="match_set" field="owner"/>
619                                 </delete>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
626                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
628                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
629                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
630                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
631                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
632                 </fields>
633                 <links>
634                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
636                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
637                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
638                 </links>
639         </class>
640
641     <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">
642         <fields oils_persist:primary="name">
643             <field reporter:label="Name" name="name" reporter:datatype="text"/>
644             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
645             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
646             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
647         </fields>
648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
649             <actions>
650                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
653                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
654             </actions>
655         </permacrud>
656     </class>
657
658     <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">
659         <fields oils_persist:primary="id">
660             <field reporter:label="ID" name="id" reporter:datatype="id"/>
661             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
662             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
663             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
664             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
665         </fields>
666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667             <actions>
668                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <retrieve/>
670                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
671                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
672             </actions>
673         </permacrud>
674     </class>
675
676         <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">
677                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
678                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
679                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
681                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
682                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
683                 </fields>
684                 <links>
685                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
686                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
687                 </links>
688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
689             <actions>
690                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <retrieve/>
692                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
693                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
694             </actions>
695         </permacrud>
696         </class>
697
698         <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">
699                 <fields oils_persist:primary="name">
700                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
701                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
702                         <field reporter:label="Description" name="description" reporter:datatype="text" />
703                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
704                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
705                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
706                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
707                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
708                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
709                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
710                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
711                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
712                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
713                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
714                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
715                 </fields>
716                 <links>
717                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
718                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
719                 </links>
720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
721             <actions>
722                 <create permission="ADMIN_SVF" global_required="true"/>
723                 <retrieve/>
724                 <update permission="ADMIN_SVF" global_required="true"/>
725                 <delete permission="ADMIN_SVF" global_required="true"/>
726             </actions>
727         </permacrud>
728         </class>
729
730         <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">
731                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
732                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
733                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
734                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
735             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
736                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
737                 </fields>
738                 <links/>
739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
740             <actions>
741                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <retrieve/>
743                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
744                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
745             </actions>
746         </permacrud>
747         </class>
748
749         <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">
750                 <fields oils_persist:primary="id">
751                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
752                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
753                 </fields>
754                 <links>
755                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
756                 </links>
757         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
758             <actions>
759                 <retrieve/>
760             </actions>
761         </permacrud>
762         </class>
763
764         <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">
765                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
766                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
767                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
768                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
769                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
770                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
771                 </fields>
772                 <links>
773                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
774                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
775                 </links>
776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
777             <actions>
778                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <retrieve/>
780                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
781                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
782             </actions>
783         </permacrud>
784         </class>
785
786         <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">
787                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
788                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
789                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
790                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
791                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
792                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
793                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
794                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
795             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
796                 </fields>
797                 <links>
798                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
799                 </links>
800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
801             <actions>
802                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
803                 <retrieve/>
804                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
805                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
806             </actions>
807         </permacrud>
808         </class>
809
810         <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">
811                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
812                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
813                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
814                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
815                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
816                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
817                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
818                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
819                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
820                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
821                 </fields>
822                 <links>
823                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
824                 </links>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
828                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
829                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
830                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
831             </actions>
832         </permacrud>
833         </class>
834
835     <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">
836         <fields oils_persist:primary="name">
837             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
838             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
839             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
840             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
841             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
842             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
843             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
844             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
845             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
846             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
847         </fields>
848         <links>
849             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
850             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
851         </links>
852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
853             <actions>
854                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
855                 <retrieve/>
856                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
857                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
858             </actions>
859         </permacrud>
860     </class>
861
862     <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">
863         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
864             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
865             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
866             <field reporter:label="Name" name="name" reporter:datatype="text"/>
867             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
868             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
869             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
870             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
871         </fields>
872         <links>
873             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
874         </links>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
878                 <retrieve/>
879                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
880                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
881             </actions>
882         </permacrud>
883     </class>
884
885         <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">
886                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
887                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
888                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
889                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
890                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
891                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
892                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
893                 </fields>
894                 <links>
895             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
896             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
897                 </links>
898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
899                         <actions>
900                                 <retrieve/>
901                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
902                         </actions>
903                 </permacrud>
904         </class>
905
906         <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">
907                 <fields oils_persist:primary="key">
908                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
909                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
910                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
911                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
912                 </fields>
913                 <links/>
914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
915                         <actions>
916                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
917                                 <retrieve/>
918                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
919                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
920                         </actions>
921                 </permacrud>
922         </class>
923
924         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
925                 <fields oils_persist:primary="module">
926                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
927                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
928                 </fields>
929                 <links/>
930         </class>
931
932         <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">
933                 <fields oils_persist:primary="module">
934                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
936                 </fields>
937                 <links/>
938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939                         <actions>
940                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
941                                 <retrieve/>
942                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
943                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
944                         </actions>
945                 </permacrud>
946         </class>
947
948         <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">
949                 <fields oils_persist:primary="module">
950                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                 </fields>
953                 <links/>
954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
955                         <actions>
956                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
957                                 <retrieve/>
958                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
959                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
960                         </actions>
961                 </permacrud>
962         </class>
963
964         <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">
965                 <fields oils_persist:primary="module">
966                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
967                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
968                 </fields>
969                 <links/>
970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
971                         <actions>
972                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
973                                 <retrieve/>
974                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
975                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
976                         </actions>
977                 </permacrud>
978         </class>
979
980         <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">
981                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
982                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
983                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
984                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
985                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
986                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
987                 </fields>
988                 <links>
989                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
990                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
991                 </links>
992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
993                         <actions>
994                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
995                     <context link="event_def" field="owner"/>
996                 </create>
997                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
998                     <context link="event_def" field="owner"/>
999                 </retrieve>
1000                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1001                     <context link="event_def" field="owner"/>
1002                 </update>
1003                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1004                     <context link="event_def" field="owner"/>
1005                 </delete>
1006                         </actions>
1007                 </permacrud>
1008         </class>
1009
1010         <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">
1011                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1012                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1013                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1014                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1015                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1016                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1017                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1018                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1019                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1020                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1021                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1022                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1023                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1024                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1025                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1026                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1027                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1028                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1029                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1030                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1031                 </fields>
1032                 <links>
1033                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1034                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1035                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1036                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1037                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1038                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1039                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1040                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1041                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1042                 </links>
1043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044                         <actions>
1045                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1046                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1047                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1048                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1049                         </actions>
1050                 </permacrud>
1051         </class>
1052
1053         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1054                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1055                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1056                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1057                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1058                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1059                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1060                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1061                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1062                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1063                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1064                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1065                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1066                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1067                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1068                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1069                 </fields>
1070                 <links>
1071                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1072                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1073                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1074                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1075                 </links>
1076         </class>
1077
1078         <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">
1079                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1080                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1081                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1082                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1083                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1084                 </fields>
1085                 <links>
1086                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1087                 </links>
1088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1089                         <actions>
1090                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1091                     <context link="event_def" field="owner"/>
1092                 </create>
1093                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1094                     <context link="event_def" field="owner"/>
1095                 </retrieve>
1096                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1097                     <context link="event_def" field="owner"/>
1098                 </update>
1099                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1100                     <context link="event_def" field="owner"/>
1101                 </delete>
1102                         </actions>
1103                 </permacrud>
1104         </class>
1105
1106         <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">
1107                 <oils_persist:source_definition><![CDATA[
1108                 SELECT  atevdef.hook,
1109                         atevdef.name,
1110                         atevdef.reactor,
1111                         atev.id,
1112                         atev.event_def,
1113                         atev.add_time,
1114                         atev.run_time,
1115                         atev.start_time,
1116                         atev.update_time,
1117                         atev.complete_time,
1118                         atev.update_process,
1119                         atev.state,
1120                         atev.user_data,
1121                         atev.template_output,
1122                         atev.error_output,
1123                         atev.async_output,
1124                         targ_circ.id AS target_circ,
1125                         targ_ahr.id AS target_hold,
1126                         COALESCE(
1127                                 targ_circ.circ_lib,
1128                                 targ_ahr.pickup_lib
1129                         ) AS perm_lib
1130                 FROM action_trigger.event atev
1131                 JOIN action_trigger.event_definition atevdef ON
1132                         (atevdef.id = atev.event_def)
1133                 JOIN action_trigger.hook ath ON
1134                         (ath.key = atevdef.hook)
1135                 LEFT JOIN action.circulation targ_circ ON
1136                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1137                 LEFT JOIN action.hold_request targ_ahr ON
1138                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1139                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1140                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1141                                 'circ.staff.max_visible_event_age',
1142                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1143                         ) UNION
1144                         SELECT '1000 YEARS'::INTERVAL AS value
1145                 ) ous)
1146                 ]]></oils_persist:source_definition>
1147                 <fields oils_persist:primary="id">
1148                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1149                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1150                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1151                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1152                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1153                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1154                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1155                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1156                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1157                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1158                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1159                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1160                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1161                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1162                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1163                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1164                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1165                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1166                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1167                 </fields>
1168                 <links>
1169                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1170                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1171                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1172                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1173                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1174                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1175                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1176                 </links>
1177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1178                         <actions>
1179                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1180                         </actions>
1181                 </permacrud>
1182         </class>
1183
1184         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1185                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1186                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1187                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1188                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1189                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1190                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1191                 </fields>
1192                 <links>
1193                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1194                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1195                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1196                 </links>
1197         </class>
1198
1199         <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">
1200                 <fields oils_persist:primary="code">
1201                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1202                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1203                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1204                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1205                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1206                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1207                 </fields>
1208                 <links/>
1209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1210             <actions>
1211                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1212                 <retrieve/>
1213                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1214                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1215             </actions>
1216         </permacrud>
1217         </class>
1218
1219         <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">
1220                 <fields oils_persist:primary="code">
1221                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1222                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1223                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1224                 </fields>
1225                 <links/>
1226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1227             <actions>
1228                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1229                 <retrieve/>
1230                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1231                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1232             </actions>
1233         </permacrud>
1234         </class>
1235
1236         <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">
1237                 <fields oils_persist:primary="code">
1238                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1239                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1240                 </fields>
1241                 <links/>
1242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1243             <actions>
1244                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1245                 <retrieve/>
1246                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1247                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1248             </actions>
1249         </permacrud>
1250         </class>
1251
1252         <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">
1253                 <fields oils_persist:primary="code">
1254                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1255                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1256                 </fields>
1257                 <links/>
1258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1259             <actions>
1260                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1261                 <retrieve/>
1262                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1263                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1264             </actions>
1265         </permacrud>
1266         </class>
1267
1268         <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">
1269                 <fields oils_persist:primary="code">
1270                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1271                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1272                 </fields>
1273                 <links/>
1274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1275             <actions>
1276                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1277                 <retrieve/>
1278                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1279                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1280             </actions>
1281         </permacrud>
1282         </class>
1283
1284         <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">
1285                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1286                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1287                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1288                 </fields>
1289                 <links/>
1290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1291             <actions>
1292                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1293                 <retrieve/>
1294                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1295                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1296             </actions>
1297         </permacrud>
1298         </class>
1299
1300         <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">
1301                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1302                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1303                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1304                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1305                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1306                 </fields>
1307         <links>
1308             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1309             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1310             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1311         </links>
1312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313             <actions>
1314                 <create permission="UPDATE_COPY">
1315                     <context link="target_copy" field="circ_lib"/>
1316                 </create>
1317                 <retrieve/>
1318                 <update permission="UPDATE_COPY">
1319                     <context link="target_copy" field="circ_lib"/>
1320                 </update>
1321                 <delete permission="UPDATE_COPY">
1322                     <context link="target_copy" field="circ_lib"/>
1323                 </delete>
1324             </actions>
1325         </permacrud>
1326         </class>
1327
1328         <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">
1329                 <fields oils_persist:primary="code">
1330                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1331                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1332                 </fields>
1333                 <links/>
1334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335             <actions>
1336                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1337                 <retrieve/>
1338                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1339                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1340             </actions>
1341         </permacrud>
1342         </class>
1343
1344         <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">
1345                 <fields oils_persist:primary="code">
1346                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1347                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1351             <actions>
1352                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1353                 <retrieve/>
1354                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1355                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1356             </actions>
1357         </permacrud>
1358         </class>
1359
1360         <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">
1361                 <fields oils_persist:primary="code">
1362                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1363                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1364                 </fields>
1365                 <links/>
1366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1367             <actions>
1368                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1369                 <retrieve/>
1370                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1371                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1372             </actions>
1373         </permacrud>
1374         </class>
1375
1376     <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">
1377         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1378             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1379             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1380             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1381             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1382             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1383             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1384             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1385             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1386             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1387             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1388             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1389             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1390             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1391             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1392             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1393             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1394             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1395         </fields>
1396         <links/>
1397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1398             <actions>
1399                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1400                 <retrieve/>
1401                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1402                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1403             </actions>
1404         </permacrud>
1405     </class>
1406
1407     <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">
1408         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1409             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1410             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1411             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1412             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1413             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1414             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1415             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1416             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1417             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1418             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1419             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1420             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1421             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1422             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1423             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1424             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1425             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1426             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1427             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1428         </fields>
1429         <links/>
1430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1431             <actions>
1432                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1433                 <retrieve/>
1434                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1435                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1436             </actions>
1437         </permacrud>
1438     </class>
1439
1440     <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">
1441         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1442             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1443             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1444             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1445             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1446             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1447         </fields>
1448         <links>
1449             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1450             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1451             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1452         </links>
1453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1454             <actions>
1455                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1456                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1457                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1458                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1459             </actions>
1460         </permacrud>
1461     </class>
1462
1463         <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">
1464                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1465                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1466                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1467                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1468                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1469                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1470                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1471                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1472                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1473                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1474                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1475                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1476                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1477                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1478                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1479                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1480                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1481             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1482                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1483                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1484                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1485                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1486                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1487                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1488                 </fields>
1489                 <links>
1490                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1491                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1492                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1493                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1494                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1495                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1496                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1497                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1498                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1499                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1500                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1501                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1502                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1503             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1504                 </links>
1505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1506             <actions>
1507                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1508                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1509                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1510                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1511             </actions>
1512         </permacrud>
1513         </class>
1514
1515         <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">
1516                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1517                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1518                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1519                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1520                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1521                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1523                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1524                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1525                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1526                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1527                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1528                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1529                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1530                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1531                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1532             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1533                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1534                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1535             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1536                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1537                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1538                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1539                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1540             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1541             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1542             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1543                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1544                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1545                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1546                 </fields>
1547                 <links>
1548                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1549                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1550                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1551                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1552                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1553                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1554                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1555                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1556                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1557                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1558                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1559                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1560                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1561                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1562             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1563                 </links>
1564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1565             <actions>
1566                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1567                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1568                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1569                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570             </actions>
1571         </permacrud>
1572         </class>
1573
1574     <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">
1575         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1576             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1577             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1578             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1579         </fields>
1580         <links/>
1581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1582             <actions>
1583                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1584                 <retrieve/>
1585                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1586                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1587             </actions>
1588         </permacrud>
1589     </class>
1590
1591     <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">
1592         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1593             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1594             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1595             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1596             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1597             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1598             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1599             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1600         </fields>
1601         <links>
1602             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1603         </links>
1604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1605             <actions>
1606                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1607                 <retrieve/>
1608                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1609                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1610             </actions>
1611         </permacrud>
1612     </class>
1613
1614     <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">
1615         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1616             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1617             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1618             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1619             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1620             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1621         </fields>
1622         <links>
1623             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1624             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1625         </links>
1626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1627             <actions>
1628                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1629                     <context link="matchpoint" field="org_unit"/>
1630                 </create>
1631                 <retrieve/>
1632                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1633                     <context link="matchpoint" field="org_unit"/>
1634                 </update>
1635                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1636                     <context link="matchpoint" field="org_unit"/>
1637                 </delete>
1638             </actions>
1639         </permacrud>
1640     </class>
1641
1642     <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">
1643         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1644             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1645             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1646             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1647         </fields>
1648         <links>
1649             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1650             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1651         </links>
1652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1653             <actions>
1654                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1655                     <context link="limit_set" field="owning_lib"/>
1656                 </create>
1657                 <retrieve/>
1658                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1659                     <context link="limit_set" field="owning_lib"/>
1660                 </update>
1661                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1662                     <context link="limit_set" field="owning_lib"/>
1663                 </delete>
1664             </actions>
1665         </permacrud>
1666     </class>
1667     <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">
1668         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1669             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1670             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1671             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1672         </fields>
1673         <links>
1674             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1675             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1676         </links>
1677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1678             <actions>
1679                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1680                     <context link="limit_set" field="owning_lib"/>
1681                 </create>
1682                 <retrieve/>
1683                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1684                     <context link="limit_set" field="owning_lib"/>
1685                 </update>
1686                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1687                     <context link="limit_set" field="owning_lib"/>
1688                 </delete>
1689             </actions>
1690         </permacrud>
1691     </class>
1692
1693     <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">
1694         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1695             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1696             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1697             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1698             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1699         </fields>
1700         <links>
1701             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1702             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1703         </links>
1704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1705             <actions>
1706                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1707                     <context link="limit_set" field="owning_lib"/>
1708                 </create>
1709                 <retrieve/>
1710                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1711                     <context link="limit_set" field="owning_lib"/>
1712                 </update>
1713                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1714                     <context link="limit_set" field="owning_lib"/>
1715                 </delete>
1716             </actions>
1717         </permacrud>
1718     </class>
1719
1720         <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">
1721                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1722                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1723                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1724                 </fields>
1725                 <links/>
1726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1727             <actions>
1728                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1729                 <retrieve/>
1730                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1731                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1732             </actions>
1733         </permacrud>
1734         </class>
1735
1736         <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">
1737                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1738                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1739                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1740                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1741                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1742                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1743                 </fields>
1744                 <links>
1745                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1746                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1747                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1748                 </links>
1749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1750             <actions>
1751                 <create permission="ADMIN_SURVEY">
1752                     <context link="survey" field="owner"/>
1753                 </create>
1754                 <retrieve/>
1755                 <update permission="ADMIN_SURVEY">
1756                     <context link="survey" field="owner"/>
1757                 </update>
1758                 <delete permission="ADMIN_SURVEY">
1759                     <context link="survey" field="owner"/>
1760                 </delete>
1761             </actions>
1762         </permacrud>
1763         </class>
1764         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1765                 <fields oils_persist:primary="id" oils_persist:sequence="">
1766                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1767                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1768                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1769                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1770                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1771                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1772                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1773                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1774                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1775                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1776                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1777                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1778                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1779                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1780                 </fields>
1781                 <links>
1782                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1783                 </links>
1784         </class>
1785         <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">
1786                 <fields oils_persist:primary="id" oils_persist:sequence="">
1787                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1788                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1789                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1790                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1791                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1792                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1793                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1794                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1795                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1796                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1797                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1798                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1799                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1800                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1801                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1802                 </fields>
1803                 <links>
1804                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1805                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1806                 </links>
1807         </class>
1808         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1809                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1810                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1811                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1812                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1813                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1814                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1815                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1816                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1817                 </fields>
1818                 <links>
1819                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1820                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1821                 </links>
1822         </class>
1823         <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">
1824                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1825                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1826                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1827                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1828                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1829                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1830                 </fields>
1831                 <links>
1832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1833                 </links>
1834         </class>
1835         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1836                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1837                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1838                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1839                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1840                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1841                 </fields>
1842                 <links>
1843                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1844                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1845                 </links>
1846         </class>
1847         <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">
1848                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1849                         <field name="field" reporter:datatype="link"/>
1850                         <field name="id" reporter:datatype="id" />
1851                         <field name="source" reporter:datatype="link"/>
1852                         <field name="value" reporter:datatype="text"/>
1853                 </fields>
1854                 <links>
1855                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1856                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1857                 </links>
1858         </class>
1859         <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">
1860                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1861                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1862                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1863                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1864                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1865                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1866                 </fields>
1867                 <links>
1868                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1869                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1870                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1871                 </links>
1872         </class>
1873         <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">
1874                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1875                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1876                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1877                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1878                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1879                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1880                 </fields>
1881                 <links>
1882                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1883                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1884                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1885                 </links>
1886         </class>
1887         <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">
1888                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1889                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1890                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1891                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1892                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1893                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1894                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1895                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1896                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1897                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1898                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1899                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1900                 </fields>
1901                 <links>
1902                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1903                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1904                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1905                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1906                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1907                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1908                 </links>
1909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1910             <actions>
1911                 <create permission="TRANSIT_COPY" context_field="owner">
1912                     <context link="target_copy" field="circ_lib"/>
1913                 </create>
1914                 <retrieve/>
1915                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1916                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1917             </actions>
1918         </permacrud>
1919         </class>
1920         <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">
1921                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1922                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1923                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1924                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1925                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1927                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1928                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1929                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1930                 </fields>
1931                 <links>
1932                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1933                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1934                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1935                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1936                 </links>
1937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1938             <actions>
1939                 <create permission="ADMIN_SURVEY">
1940                     <context link="survey" field="owner"/>
1941                 </create>
1942                 <retrieve/>
1943                 <update permission="ADMIN_SURVEY">
1944                     <context link="survey" field="owner"/>
1945                 </update>
1946                 <delete permission="ADMIN_SURVEY">
1947                     <context link="survey" field="owner"/>
1948                 </delete>
1949             </actions>
1950         </permacrud>
1951         </class>
1952         <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">
1953                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1954                         <field name="bucket" />
1955                         <field name="id" reporter:datatype="id" />
1956                         <field name="target_copy" reporter:datatype="link"/>
1957                         <field name="create_time" reporter:datatype="timestamp" />
1958                         <field name="pos" reporter:datatype="int" />
1959                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1960                 </fields>
1961                 <links>
1962                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1963                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1964             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1965                 </links>
1966         </class>
1967         <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">
1968                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1969                         <field name="id" reporter:datatype="id" />
1970                         <field name="item" reporter:datatype="link"/>
1971                         <field name="note" reporter:datatype="text" />
1972                 </fields>
1973                 <links>
1974                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1975                 </links>
1976         </class>
1977
1978         <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">
1979                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1980                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1982                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1983                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1984                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1985                 </fields>
1986                 <links>
1987                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1988                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1989                 </links>
1990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1991                         <actions>
1992                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1993                                 <retrieve/>
1994                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1995                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1996                         </actions>
1997                 </permacrud>
1998         </class>
1999
2000         <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">
2001                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2002                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2003                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2004                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2005                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2006                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2007                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2008                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2009                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2010                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2011                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2012                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2013                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2014                 </fields>
2015                 <links>
2016                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2017                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2018                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2019                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2020                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2021                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2022                 </links>
2023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2024                         <actions>
2025                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2026                                 <retrieve/>
2027                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2028                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2029                         </actions>
2030                 </permacrud>
2031         </class>
2032
2033         <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">
2034                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2035                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2036                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2037                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2038                 </fields>
2039                 <links>
2040                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2041                 </links>
2042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2043                         <actions>
2044                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2045                                 <retrieve/>
2046                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2047                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2048                         </actions>
2049                 </permacrud>
2050         </class>
2051
2052         <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">
2053                 <fields oils_persist:primary="code">
2054                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2055                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2056                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2057                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2058                 </fields>
2059                 <links>
2060                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2061                 </links>
2062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2063                         <actions>
2064                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2065                                 <retrieve/>
2066                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2067                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2068                         </actions>
2069                 </permacrud>
2070         </class>
2071
2072         <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">
2073                 <fields oils_persist:primary="code">
2074                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2075                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2076                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2077                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2078                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2079                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2080                 </fields>
2081                 <links>
2082                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2083                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2084                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2085                 </links>
2086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2087                         <actions>
2088                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2089                                 <retrieve/>
2090                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2091                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2092                         </actions>
2093                 </permacrud>
2094         </class>
2095
2096     <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">
2097         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2098             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2099             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2100             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2101         </fields>
2102         <links>
2103             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2104             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2105         </links>
2106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2107             <actions>
2108                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                 <retrieve/>
2110                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2111                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2112             </actions>
2113         </permacrud>
2114     </class>
2115
2116         <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">
2117                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2118                         <field name="active" reporter:datatype="bool"/>
2119                         <field name="create_date" reporter:datatype="timestamp"/>
2120                         <field name="creator" />
2121                         <field name="deleted" reporter:datatype="bool"/>
2122                         <field name="edit_date" reporter:datatype="timestamp"/>
2123                         <field name="editor" />
2124                         <field name="id" reporter:datatype="id" />
2125                         <field name="last_xact_id" />
2126                         <field name="marc" />
2127                         <field name="source" />
2128                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2129                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2130                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2131                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2132                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2133                 </fields>
2134                 <links>
2135                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2136                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2137                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2138                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2139                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2140                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2141                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2142                 </links>
2143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144                         <actions>
2145                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2146                                 <retrieve/>
2147                                 <update permission="UPDATE_MARC" global_required="true"/>
2148                                 <delete permission="UPDATE_MARC" global_required="true"/>
2149                         </actions>
2150                 </permacrud>
2151         </class>
2152         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2153                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2154                         <field name="char_encoding" />
2155                         <field name="id" />
2156                         <field name="record" />
2157                         <field name="record_status" />
2158                         <field name="thesaurus" />
2159                 </fields>
2160                 <links>
2161                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2162                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2163                 </links>
2164         </class>
2165         <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">
2166                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2167                         <field name="id" reporter:datatype="id" />
2168                         <field name="bib" reporter:datatype="link" />
2169                         <field name="authority" reporter:datatype="link" />
2170                 </fields>
2171                 <links>
2172                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2173                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2174                 </links>
2175         </class>
2176         <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">
2177                 <fields oils_persist:primary="code" oils_persist:sequence="">
2178                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2179                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2180                 </fields>
2181                 <links/>
2182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2183             <actions>
2184                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2185                 <retrieve/>
2186                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2187                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2188             </actions>
2189         </permacrud>
2190         </class>
2191         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2192                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2193                         <field name="accepting_usr" />
2194                         <field name="amount" reporter:datatype="money" />
2195                         <field name="amount_collected" reporter:datatype="money" />
2196                         <field name="approval_code" reporter:datatype="text"/>
2197                         <field name="cash_drawer" reporter:datatype="link"/>
2198                         <field name="cc_first_name" reporter:datatype="text"/>
2199                         <field name="cc_last_name" reporter:datatype="text"/>
2200                         <field name="cc_number" reporter:datatype="text"/>
2201                         <field name="cc_order_number" reporter:datatype="text"/>
2202                         <field name="cc_type" reporter:datatype="text"/>
2203                         <field name="cc_processor" reporter:datatype="text"/>
2204                         <field name="expire_month" reporter:datatype="int" />
2205                         <field name="expire_year" reporter:datatype="int" />
2206                         <field name="id" reporter:datatype="id" />
2207                         <field name="note" reporter:datatype="text"/>
2208                         <field name="payment_ts" reporter:datatype="timestamp"/>
2209                         <field name="xact" reporter:datatype="link"/>
2210                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2211                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2212                 </fields>
2213                 <links>
2214                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2215                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2216                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2217                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2218                 </links>
2219         </class>
2220         <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">
2221                 <fields oils_persist:primary="name">
2222                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2223                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2224                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2225                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2226                 </fields>
2227                 <links/>
2228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2229             <actions>
2230                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2231                 <retrieve/>
2232                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2233                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2234             </actions>
2235         </permacrud>
2236         </class>
2237
2238         <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">
2239                 <fields oils_persist:primary="alias">
2240                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2241                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2242                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2243                 </fields>
2244                 <links>
2245                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2246                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2247                 </links>
2248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2249             <actions>
2250                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2251                 <retrieve/>
2252                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2253                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2254             </actions>
2255         </permacrud>
2256         </class>
2257
2258         <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">
2259                 <fields oils_persist:primary="name">
2260                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2261                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2262                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2263                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2264                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2265                 </fields>
2266                 <links>
2267                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2268                 </links>
2269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2270             <actions>
2271                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2272                 <retrieve/>
2273                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2274                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2275             </actions>
2276         </permacrud>
2277         </class>
2278
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2281                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2282                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2283                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2284                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2285                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2286                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2287                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2288                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2289                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2290                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2291                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2292                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2293                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2294                 </fields>
2295                 <links>
2296                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2297                 </links>
2298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2299             <actions>
2300                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2301                 <retrieve/>
2302                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2303                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2304             </actions>
2305         </permacrud>
2306         </class>
2307         <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">
2308                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2309                         <field name="id" reporter:datatype="id" />
2310                         <field name="name" reporter:datatype="text"/>
2311                         <field name="xpath" reporter:datatype="text"/>
2312                         <field name="format" reporter:datatype="link"/>
2313                         <field name="first_word" reporter:datatype="bool" />
2314                 </fields>
2315                 <links/>
2316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2317             <actions>
2318                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2319                 <retrieve/>
2320                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2321                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2322             </actions>
2323         </permacrud>
2324         </class>
2325         <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">
2326                 <fields oils_persist:primary="code" oils_persist:sequence="">
2327                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2328                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2329                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2330                 </fields>
2331                 <links/>
2332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2333             <actions>
2334                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2335                 <retrieve/>
2336                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2337                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2338             </actions>
2339         </permacrud>
2340         </class>
2341         <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">
2342                 <fields oils_persist:primary="code" oils_persist:sequence="">
2343                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2344                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2345                 </fields>
2346                 <links/>
2347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348             <actions>
2349                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2350                 <retrieve/>
2351                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2352                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2353             </actions>
2354         </permacrud>
2355         </class>
2356     <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">
2357         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2358             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2359             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2360             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2361             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2362         </fields>
2363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2364             <actions>
2365                 <retrieve/>
2366             </actions>
2367         </permacrud>
2368     </class>
2369         <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">
2370                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2371                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2372                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2373                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2374                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2375                 </fields>
2376                 <links>
2377                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2378                 </links>
2379         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2380             <actions>
2381                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2382                 <retrieve/>
2383                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2384                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2385             </actions>
2386         </permacrud>
2387         </class>
2388         <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">
2389                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2390                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2391                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2392                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2393                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2394                 </fields>
2395                 <links>
2396                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2397                 </links>
2398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2399             <actions>
2400                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2401                 <retrieve/>
2402                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2403                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2404             </actions>
2405         </permacrud>
2406         </class>
2407         <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">
2408                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2409                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2410                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2411                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2412                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2413                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2414                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2415                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2416                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2417                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2418                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2419                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2423                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2424                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2425                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2426                 </fields>
2427                 <links>
2428                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2429                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2430                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2431                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2432                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2433                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2434                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2435                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2436                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2437                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2438                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2439                 </links>
2440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2441             <actions>
2442                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2443                 <retrieve/>
2444                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2445                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2446             </actions>
2447         </permacrud>
2448         </class>
2449         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2450                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2451                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2452                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2453                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2454                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2455                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2456                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2457                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2458                 </fields>
2459                 <links>
2460                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2461                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2462         </links>
2463         </class>
2464         <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">
2465                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2466                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2467                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2468                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2469                 </fields>
2470                 <links>
2471                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2472                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2473                 </links>
2474         </class>
2475         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2476                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2477                         <field name="id" reporter:datatype="id" />
2478                         <field name="value" oils_persist:i18n="true" />
2479                 </fields>
2480                 <links/>
2481         </class>
2482         <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">
2483                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2484                         <field name="balance_owed" reporter:datatype="money" />
2485                         <field name="total_owed" reporter:datatype="money" />
2486                         <field name="total_paid" reporter:datatype="money" />
2487                         <field name="usr" reporter:datatype="link"/>
2488                 </fields>
2489                 <links>
2490                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2491         </links>
2492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2493             <actions>
2494                 <retrieve permission="VIEW_USER">
2495                     <context link="usr" field="home_ou"/>
2496                 </retrieve>
2497             </actions>
2498         </permacrud>
2499         </class>
2500         <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">
2501                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2502                         <field name="collector" />
2503                         <field name="enter_time" reporter:datatype="timestamp"/>
2504                         <field name="id" reporter:datatype="id" />
2505                         <field name="location" reporter:datatype="link"/>
2506                         <field name="usr" reporter:datatype="link"/>
2507                 </fields>
2508                 <links>
2509                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2510                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2511                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2512                 </links>
2513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2514             <actions>
2515                 <create permission="money.collections_tracker.create" context_field="location"/>
2516                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2517                 <delete permission="money.collections_tracker.create" context_field="location"/>
2518             </actions>
2519         </permacrud>
2520         </class>
2521         <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">
2522                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2523                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2524                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2525                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2526                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2527                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2528                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2529                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2530                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2531                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2532                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2533                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2534                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2535                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2536                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2537                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2538                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2539                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2540                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2541                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2542                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2543                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2544                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2545                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2546                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2547                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2548                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2550                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2555                 </fields>
2556                 <links>
2557                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2558                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2559                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2560                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2561                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2562                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2563                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2564                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2565                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2566                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2567                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2568                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2569                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2570                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2571                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2572                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2573                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2574                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2575                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2576                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2577                 </links>
2578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579             <actions>
2580                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2581                 <retrieve/>
2582                 <update permission="UPDATE_MARC" global_required="true"/>
2583             </actions>
2584         </permacrud>
2585         </class>
2586         <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">
2587                 <fields oils_persist:primary="id">
2588                         <field name="dow_0_close" />
2589                         <field name="dow_0_open" />
2590                         <field name="dow_1_close" />
2591                         <field name="dow_1_open" />
2592                         <field name="dow_2_close" />
2593                         <field name="dow_2_open" />
2594                         <field name="dow_3_close" />
2595                         <field name="dow_3_open" />
2596                         <field name="dow_4_close" />
2597                         <field name="dow_4_open" />
2598                         <field name="dow_5_close" />
2599                         <field name="dow_5_open" />
2600                         <field name="dow_6_close" />
2601                         <field name="dow_6_open" />
2602                         <field name="id" reporter:datatype="id" />
2603                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2604                 </fields>
2605                 <links>
2606                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2607                 </links>
2608         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2609             <actions>
2610                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2611                 <retrieve/>
2612                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2613                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2614             </actions>
2615         </permacrud>
2616         </class>
2617         <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">
2618                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2619                         <field name="id" reporter:datatype="id" />
2620                         <field name="record" reporter:datatype="link"/>
2621                         <field name="label" reporter:datatype="text"/>
2622                         <field name="label_sortkey" reporter:datatype="text"/>
2623                 </fields>
2624                 <links>
2625                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2626                 </links>
2627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2628             <actions>
2629                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2630                 <retrieve/>
2631                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2632                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2633             </actions>
2634         </permacrud>
2635         </class>
2636         <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">
2637                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2638                         <field name="id" reporter:datatype="id" />
2639                         <field name="target_copy" reporter:datatype="link" />
2640                         <field name="part" reporter:datatype="link"/>
2641                 </fields>
2642                 <links>
2643                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2644                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2645                 </links>
2646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647             <actions>
2648                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2649                 <retrieve/>
2650                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2651                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2652             </actions>
2653         </permacrud>
2654         </class>
2655         <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">
2656                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2657                         <field name="close_end" reporter:datatype="timestamp" />
2658                         <field name="close_start" reporter:datatype="timestamp" />
2659                         <field name="id" reporter:datatype="id" />
2660                         <field name="org_unit" reporter:datatype="org_unit"/>
2661                         <field name="reason" reporter:datatype="text"/>
2662                 </fields>
2663                 <links>
2664                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2665                 </links>
2666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2667             <actions>
2668                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2669                 <retrieve/>
2670                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2671                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2672             </actions>
2673         </permacrud>
2674         </class>
2675         <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">
2676                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2677                         <field name="extended" reporter:datatype="interval"/>
2678                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2679                         <field name="max_renewals" reporter:datatype="int" />
2680                         <field name="name" reporter:datatype="text"/>
2681                         <field name="normal" reporter:datatype="interval"/>
2682                         <field name="shrt" reporter:datatype="interval"/>
2683                 </fields>
2684                 <links>
2685                 </links>
2686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2687             <actions>
2688                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2689                 <retrieve/>
2690                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2691                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2692             </actions>
2693         </permacrud>
2694         </class>
2695
2696         <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">
2697                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2698                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2699                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2700             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2701                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2702             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2703                 </fields>
2704                 <links>
2705             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2706                 </links>
2707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2708             <actions>
2709                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2710                 <retrieve/>
2711                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2712                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2713             </actions>
2714                 </permacrud>
2715         </class>
2716
2717         <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">
2718                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2719                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2720                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2721                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2722             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2723                 </fields>
2724                 <links>
2725                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2726                 </links>
2727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2728             <actions>
2729                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2730                 <retrieve/>
2731                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2732                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2733             </actions>
2734                 </permacrud>
2735         </class>
2736
2737         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2738                 <fields oils_persist:primary="id" oils_persist:sequence="">
2739                         <field name="balance_owed" reporter:datatype="money"/>
2740                         <field name="id" reporter:datatype="id" />
2741                         <field name="last_billing_note" reporter:datatype="text"/>
2742                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2743                         <field name="last_billing_type" reporter:datatype="text"/>
2744                         <field name="last_payment_note" reporter:datatype="text"/>
2745                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2746                         <field name="last_payment_type" reporter:datatype="text"/>
2747                         <field name="total_owed" reporter:datatype="money"/>
2748                         <field name="total_paid" reporter:datatype="money"/>
2749                         <field name="usr" reporter:datatype="link"/>
2750                         <field name="xact_finish" reporter:datatype="timestamp" />
2751                         <field name="xact_start" reporter:datatype="timestamp" />
2752                         <field name="xact_type" reporter:datatype="text"/>
2753                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2754                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2755                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2756                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2757                         <field name="billing_location" reporter:datatype="link"/>
2758                 </fields>
2759                 <links>
2760                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2761                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2762                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2763                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2764                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2765                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2766                 </links>
2767         </class>
2768         <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">
2769                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2770                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2771                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2772                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2773                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2774                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2775                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2776                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2777                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2779                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2782                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2783                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2784                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2785                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2786                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2787                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2788                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2789                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2790                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2791                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2792                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2793                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2794                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2795                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2796                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2797                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2798                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2799                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2800                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2801                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2802                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2803                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2804                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2805                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2806                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2807                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2808                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2809                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2810                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2811                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2812                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2813                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2814                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2815                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2816                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2817                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2818                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2819                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2820                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2821                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2823                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2824                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2825                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2826                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2827                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2828                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2829                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2830                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2831                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2832                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2833                 </fields>
2834                 <links>
2835                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2836                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2837                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2838                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2839                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2840                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2841                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2842                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2843                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2844                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2845                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2846                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2847                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2848                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2849                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2850                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2851                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2852                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2853                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2854                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2855                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2856                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2857                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2858                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2859                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2860                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2861                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2862                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2863                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2864                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2865                 </links>
2866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2867                         <actions>
2868                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2869                         </actions>
2870                 </permacrud>
2871         </class>
2872         <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">
2873                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2874                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2875                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2876                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2877                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2878                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2879                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2880                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2881                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2882         </fields>
2883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2884                         <actions>
2885                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2886                                 <retrieve/>
2887                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2888                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2889                         </actions>
2890                 </permacrud>
2891         </class>
2892         <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">
2893                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2894                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2895                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2896                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2897                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2898         </fields>
2899         <links>
2900                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2901                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2902                 </links>
2903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2904                         <actions>
2905                                 <retrieve permission="RUN_REPORTS">
2906                                         <context link="usr" field="home_ou" />
2907                                 </retrieve>
2908                         </actions>
2909                 </permacrud>
2910         </class>
2911         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2913                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2914                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2915                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2916                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2917                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2918                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2919         </fields>
2920         <links>
2921                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2922                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2923                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2924                 </links>
2925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2926                         <actions>
2927                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2928                                         <context link="usr" field="home_ou" />
2929                                         <context link="ws" field="owning_lib" />
2930                                 </retrieve>
2931                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2932                                         <context link="usr" field="home_ou" />
2933                                         <context link="ws" field="owning_lib" />
2934                                 </create>
2935                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2936                                         <context link="usr" field="home_ou" />
2937                                         <context link="ws" field="owning_lib" />
2938                                 </update>
2939                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2940                                         <context link="usr" field="home_ou" />
2941                                         <context link="ws" field="owning_lib" />
2942                                 </delete>
2943                         </actions>
2944                 </permacrud>
2945         </class>
2946         <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">
2947                 <fields oils_persist:primary="name">
2948                         <field name="name" reporter:datatype="text"/>
2949                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2950                 </fields>
2951                 <links/>
2952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2953                         <actions>
2954                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2955                                 <retrieve/>
2956                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2957                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2958                         </actions>
2959                 </permacrud>
2960         </class>
2961         <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">
2962                 <fields oils_persist:primary="name">
2963                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2964                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2965                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2966                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2967                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2968                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2969                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2970                 </fields>
2971                 <links>
2972                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2973                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2974                 </links>
2975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2976                         <actions>
2977                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2978                                 <retrieve/>
2979                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2980                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2981                         </actions>
2982                 </permacrud>
2983         </class>
2984         <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">
2985                 <fields oils_persist:primary="name">
2986                         <field name="name" reporter:datatype="text"/>
2987                         <field name="label" reporter:datatype="text"/>
2988                         <field name="description" reporter:datatype="text"/>
2989                         <field name="datatype" reporter:datatype="text"/>
2990                         <field name="view_perm" reporter:datatype="link"/>
2991                         <field name="update_perm" reporter:datatype="link"/>
2992                         <field name="fm_class" reporter:datatype="text"/>
2993                         <field name="grp" reporter:datatype="link"/>
2994                 </fields>
2995                 <links>
2996                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2997                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2998                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2999                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3000                 </links>
3001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3002                         <actions>
3003                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3004                                 <retrieve/>
3005                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3006                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3007                         </actions>
3008                 </permacrud>
3009         </class>
3010         <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">
3011                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3012                         <field name="id" />
3013                         <field name="name"  reporter:datatype="text"/>
3014                         <field name="org_unit" reporter:datatype="org_unit"/>
3015                         <field name="value"  reporter:datatype="text"/>
3016                 </fields>
3017                 <links>
3018                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3019                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3020                 </links>
3021         </class>
3022         <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">
3023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3024                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3025                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3026                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3027                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3028                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3029                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3030                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3031                 </fields>
3032                 <links>
3033                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3034                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3035                 </links>
3036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3037             <actions>
3038                 <create permission="CREATE_COPY_NOTE">
3039                     <context link="owning_copy" field="circ_lib"/>
3040                 </create>
3041                 <retrieve permission="VIEW_COPY_NOTES">
3042                     <context link="owning_copy" field="circ_lib"/>
3043                 </retrieve>
3044                 <update permission="UPDATE_COPY_NOTE">
3045                     <context link="owning_copy" field="circ_lib"/>
3046                 </update>
3047                 <delete permission="DELETE_COPY_NOTE">
3048                     <context link="owning_copy" field="circ_lib"/>
3049                 </delete>
3050             </actions>
3051         </permacrud>
3052         </class>
3053         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3054                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3055                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3056                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3057                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3058                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3059                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3060                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3061                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3062                 </fields>
3063                 <links>
3064                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3065                 </links>
3066         </class>
3067         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3068                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3069                         <field name="fingerprint"  reporter:datatype="text"/>
3070                         <field name="id" reporter:datatype="id" />
3071                         <field name="master_record" reporter:datatype="link"/>
3072                         <field name="mods"  reporter:datatype="text"/>
3073                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3074                 </fields>
3075                 <links>
3076                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3077                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3078                 </links>
3079         </class>
3080         <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">
3081                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3082                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3083                         <field name="name"  reporter:datatype="text"/>
3084                 </fields>
3085                 <links/>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3091                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3092             </actions>
3093         </permacrud>
3094         </class>
3095         <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">
3096                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3097                         <field name="code"  reporter:datatype="text"/>
3098                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3099                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3100                 </fields>
3101                 <links/>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_PERM" global_required="true"/>
3105                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3106                 <update permission="UPDATE_PERM" global_required="true"/>
3107                 <delete permission="DELETE_PERM" global_required="true"/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111         <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">
3112                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3113                         <field name="id" reporter:datatype="id" />
3114                         <field name="metarecord" reporter:datatype="link"/>
3115                         <field name="source" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3119                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3120                 </links>
3121         </class>
3122         <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">
3123                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3124                         <field name="id" reporter:datatype="id" />
3125                         <field name="field" reporter:datatype="link"/>
3126                         <field name="source" reporter:datatype="link"/>
3127                         <field name="value"  reporter:datatype="text"/>
3128                 </fields>
3129                 <links>
3130                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3131                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3132                 </links>
3133         </class>
3134         <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">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3136                         <field name="id" reporter:datatype="id" />
3137                         <field name="value" reporter:datatype="text"/>
3138                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3142                 </links>
3143         </class>
3144         <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">
3145                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3146                         <field name="id" reporter:datatype="id" />
3147                         <field name="entry" reporter:datatype="link"/>
3148                         <field name="def" reporter:datatype="link"/>
3149                         <field name="source" reporter:datatype="link"/>
3150                 </fields>
3151                 <links>
3152                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3153                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3154                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3155                 </links>
3156         </class>
3157         <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">
3158                 <oils_persist:source_definition>
3159                         SELECT * FROM metabib.author_field_entry
3160                                                 UNION ALL
3161                         SELECT * FROM metabib.keyword_field_entry
3162                                                 UNION ALL
3163                         SELECT * FROM metabib.identifier_field_entry
3164                                                 UNION ALL
3165                         SELECT * FROM metabib.title_field_entry
3166                                                 UNION ALL
3167                         SELECT * FROM metabib.subject_field_entry
3168                                                 UNION ALL
3169                         SELECT * FROM metabib.series_field_entry
3170                 </oils_persist:source_definition>
3171                 <fields>
3172                         <field name="field" reporter:datatype="link"/>
3173                         <field name="id" reporter:datatype="id" />
3174                         <field name="source" reporter:datatype="link"/>
3175                         <field name="value"  reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3179                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3180                 </links>
3181         </class>
3182         <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">
3183                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3184                         <field name="field" reporter:datatype="link"/>
3185                         <field name="id" reporter:datatype="id" />
3186                         <field name="source" reporter:datatype="link"/>
3187                         <field name="value"  reporter:datatype="text"/>
3188                 </fields>
3189                 <links>
3190                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3191                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3192                 </links>
3193         </class>
3194         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3196                         <field name="accepting_usr" reporter:datatype="link"/>
3197                         <field name="amount" reporter:datatype="money" />
3198                         <field name="amount_collected" reporter:datatype="money" />
3199                         <field name="cash_drawer" reporter:datatype="link"/>
3200                         <field name="id" reporter:datatype="id" />
3201                         <field name="note"  reporter:datatype="text"/>
3202                         <field name="payment_ts" reporter:datatype="timestamp"/>
3203                         <field name="xact" reporter:datatype="link"/>
3204                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3205                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3206                 </fields>
3207                 <links>
3208                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3209                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3210                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3211                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3212                 </links>
3213         </class>
3214         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3216                         <field name="accepting_usr" reporter:datatype="link"/>
3217                         <field name="amount" reporter:datatype="money" />
3218                         <field name="amount_collected" reporter:datatype="money" />
3219                         <field name="id" reporter:datatype="id" />
3220                         <field name="note"  reporter:datatype="text"/>
3221                         <field name="payment_ts" reporter:datatype="timestamp"/>
3222                         <field name="xact" reporter:datatype="link"/>
3223                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3224                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3225                 </fields>
3226                 <links>
3227                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3228                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3229                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3230                 </links>
3231         </class>
3232         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3233                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3234                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3235                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3236                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3237                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3238                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3239                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3240                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3241                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3242                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3243                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3244                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3245                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3246                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3247                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3248                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3249                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3250                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3251                 </fields>
3252                 <links>
3253                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3254                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3255                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3256                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3257                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3258                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3259                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3260                 </links>
3261         </class>
3262
3263         <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">
3264                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3265                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3266                         <field name="name"  reporter:datatype="text"/>
3267                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3268                         <field name="block_list" reporter:datatype="text"/>
3269                         <field name="staff_alert" reporter:datatype="bool"/>
3270                         <field name="org_depth" reporter:datatype="int"/>
3271                 </fields>
3272                 <links/>
3273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3274             <actions>
3275                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3276                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3277                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3278                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3279             </actions>
3280         </permacrud>
3281         </class>
3282         <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">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3284                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3285                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3286                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3287                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3288                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3289                 </fields>
3290                 <links>
3291                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3292                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3293                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3294         </links>
3295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3296             <actions>
3297                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3298                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3299                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3300                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3301             </actions>
3302         </permacrud>
3303         </class>
3304         <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">
3305                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3306                         <field name="holdable" reporter:datatype="bool"/>
3307                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3308                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3309                         <field name="opac_visible" reporter:datatype="bool"/>
3310             <field name="copy_active" reporter:datatype="bool"/>
3311             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3312                 </fields>
3313                 <links/>
3314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3315             <actions>
3316                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3317                 <retrieve/>
3318                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3319                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3320             </actions>
3321         </permacrud>
3322         </class>
3323         <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">
3324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3325                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3326                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3327                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3328                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3329                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3330                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3331                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3332                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3333                 </fields>
3334                 <links>
3335                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3336                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3337                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3338                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3339                 </links>
3340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3341                         <actions>
3342                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3343                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3344                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3345                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3346                         </actions>
3347                 </permacrud>
3348         </class>
3349         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3350                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3351                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3352                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3353                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3354                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3355                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3356                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3357                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3358                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3359                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3360                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3361                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3362                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3363                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3364                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3365                 </fields>
3366                 <links>
3367                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3368                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3369                 </links>
3370         </class>
3371         <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">
3372                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3373                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3374                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3375                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3376                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3377                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3378                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3379                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3380                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3381                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3382                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3383                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3384                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3385                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3386                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3387                 </fields>
3388                 <links>
3389                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3390                 </links>
3391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3392                         <actions>
3393                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3394                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3395                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3396                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3397                         </actions>
3398                 </permacrud>
3399         </class>
3400
3401
3402         <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">
3403                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3405                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3406                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3407                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3408                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3409                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3410                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3411                 </fields>
3412                 <links>
3413                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3414                 </links>
3415         </class>
3416
3417         <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">
3418                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3419                         <field name="call_number" />
3420                         <field name="create_date" reporter:datatype="timestamp"/>
3421                         <field name="creator" reporter:datatype="link"/>
3422                         <field name="id" reporter:datatype="id" />
3423                         <field name="pub" reporter:datatype="bool"/>
3424                         <field name="title"  reporter:datatype="text"/>
3425                         <field name="value"  reporter:datatype="text"/>
3426                 </fields>
3427                 <links>
3428                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3429                 </links>
3430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3431             <actions>
3432                 <create permission="CREATE_VOLUME_NOTE">
3433                     <context link="call_number" field="owning_lib"/>
3434                 </create>
3435                 <retrieve permission="VIEW_VOLUME_NOTES">
3436                     <context link="call_number" field="owning_lib"/>
3437                 </retrieve>
3438                 <update permission="UPDATE_VOLUME_NOTE">
3439                     <context link="call_number" field="owning_lib"/>
3440                 </update>
3441                 <delete permission="DELETE_VOLUME_NOTE">
3442                     <context link="call_number" field="owning_lib"/>
3443                 </delete>
3444             </actions>
3445         </permacrud>
3446         </class>
3447         <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">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3449                         <field name="create_date" reporter:datatype="timestamp"/>
3450                         <field name="creator" reporter:datatype="link"/>
3451                         <field name="edit_date" reporter:datatype="timestamp"/>
3452                         <field name="editor" reporter:datatype="link"/>
3453                         <field name="id" reporter:datatype="id" />
3454                         <field name="record" reporter:datatype="link"/>
3455                         <field name="value" reporter:datatype="text"/>
3456                 </fields>
3457                 <links>
3458                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3459                 </links>
3460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3461             <actions>
3462                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3463                 <retrieve/>
3464                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3465                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3466             </actions>
3467         </permacrud>
3468         </class>
3469         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3470         <oils_persist:source_definition>
3471 SELECT  usr,
3472         SUM(
3473             CASE
3474                 WHEN (
3475                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3476                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3477                 ) THEN 1
3478                 ELSE 0
3479             END
3480         ) AS out,
3481
3482         SUM(
3483             CASE
3484                 WHEN (
3485                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3486                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3487                 ) THEN 1
3488                 ELSE 0
3489             END
3490         ) AS overdue,
3491
3492         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3493         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3494         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3495   FROM  action.circulation
3496   WHERE checkin_time IS NULL
3497   GROUP BY 1
3498         </oils_persist:source_definition>
3499         <fields oils_persist:primary="usr">
3500             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3501             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3502             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3503             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3504             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3505             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3506         </fields>
3507         <links>
3508             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3509         </links>
3510         </class>
3511         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3512         <oils_persist:source_definition>
3513 SELECT  usr,
3514         ARRAY_TO_STRING(ARRAY_ACCUM(
3515             CASE
3516                 WHEN (
3517                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3518                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3519                 ) THEN id
3520                 ELSE 0
3521             END
3522         ),',') AS out,
3523
3524         ARRAY_TO_STRING(ARRAY_ACCUM(
3525             CASE
3526                 WHEN (
3527                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3528                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3529                 ) THEN id
3530                 ELSE 0
3531             END
3532         ),',') AS overdue,
3533
3534         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3535         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3536         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3537   FROM  action.circulation
3538   WHERE checkin_time IS NULL
3539   GROUP BY 1
3540         </oils_persist:source_definition>
3541         <fields oils_persist:primary="usr">
3542             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3543             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3544             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3545             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3546             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3547             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3548         </fields>
3549         <links>
3550             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3551         </links>
3552         </class>
3553         <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">
3554                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3555                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3556                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3557                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3558                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3559                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3560                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3561                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3562                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3563                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3564                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3565                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3566                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3567                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3568                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3569                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3570                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3571                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3572                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3573                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3574                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3575                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3576                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3577                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3578                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3579                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3580                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3581                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3582                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3583                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3584                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3585                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3586                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3587                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3588                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3589                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3590                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3591                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3592                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3593                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3595                 </fields>
3596                 <links>
3597                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3598                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3599                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3600                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3601                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3602                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3603                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3604                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3605                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3606                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3607                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3608                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3609                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3610                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3611                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3612                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3613                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3614                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3615                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3616                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3617                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3618                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3619                 </links>
3620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3621                         <actions>
3622                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3623                         </actions>
3624                 </permacrud>
3625         </class>
3626         <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">
3627                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3628                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3629                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3630                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3631                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3632                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3633                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3634                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3635                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3636                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3637                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3638                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3639                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3640                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3641                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3642                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3643                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3644                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3645                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3646                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3647                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3648                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3649                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3650                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3651                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3652                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3653                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3654                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3658                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3659                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3660                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3661                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3662                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3663                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3664                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3665                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3666                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3667                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3668                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3669                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3670                 </fields>
3671                 <links>
3672                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3673                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3674                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3675                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3676                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3677                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3678                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3679                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3680                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3681                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3682                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3683                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3684                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3685                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3686                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3687                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3688                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3689                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3690                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3691                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3692                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3693                 </links>
3694         </class>
3695         <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">
3696                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3697                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3698                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3699                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3700                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3701                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3702                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3703                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3704                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3705                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3706                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3707                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3708                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3709                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3710                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3711                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3712                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3713                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3714                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3715                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3716                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3717                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3718                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3719                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3720                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3721                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3722                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3723                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3724                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3725                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3726                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3727                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3728                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3729                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3730                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3731                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3732                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3733                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3734                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3735                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3736                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3737                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3738                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3739                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3740                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3741                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3743                 </fields>
3744                 <links>
3745                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3746                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3747                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3748                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3749                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3750                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3751                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3752                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3753                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3754                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3755                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3756                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3757                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3758                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3759                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3760                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3761                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3762                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3763                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3764                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3765                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3766                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3767                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3768                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3769                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3770                 </links>
3771         </class>
3772
3773         <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">
3774                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3775                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3776                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3777                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3778                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3779                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3780                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3781                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3782                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3783                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3784                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3785                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3786                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3787                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3788                 </fields>
3789                 <links>
3790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3791                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3792                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3793                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3794                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3795                 </links>
3796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797                         <actions>
3798                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3799                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3800                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3801                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3802                         </actions>
3803                 </permacrud>
3804         </class>
3805
3806         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3808                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3809                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3810                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3811                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3812                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3813                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3814                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3815                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3816                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3818                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3819                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3820                 </fields>
3821                 <links>
3822                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3823                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3824                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3825                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3826                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3827                 </links>
3828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3829                         <actions>
3830                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3831                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3832                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3833                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3834                         </actions>
3835                 </permacrud>
3836         </class>
3837         
3838         <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">
3839                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3840                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3841                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3842                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3843                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3844                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3845                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3846                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3847                 </fields>
3848                 <links>
3849                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3850                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3851                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3852                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3853                 </links>
3854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3855                         <actions>
3856                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3857                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3858                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3859                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3860                         </actions>
3861                 </permacrud>
3862         </class>
3863         
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3866                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3867                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3868                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3869                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3870                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3872                 </fields>
3873                 <links>
3874                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3875                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3876                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3877                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3878                 </links>
3879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3880                         <actions>
3881                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3882                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3883                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3884                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3885                         </actions>
3886                 </permacrud>
3887         </class>
3888         
3889         <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">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3891                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3892                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3893                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3894                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3895                 </fields>
3896                 <links>
3897                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3898                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3899                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3900                 </links>
3901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3902                         <actions>
3903                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3904                     <context link="resource" field="owner" />
3905                 </create>
3906                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3907                     <context link="resource" field="owner" />
3908                 </retrieve>
3909                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3910                     <context link="resource" field="owner" />
3911                 </update>
3912                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3913                     <context link="resource" field="owner" />
3914                 </delete>
3915                         </actions>
3916                 </permacrud>
3917         </class>
3918         
3919         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3921                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3922                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3923                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3924                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3925                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3926                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3927                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3928                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3929                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3930                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3932                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3933                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3934                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3935                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3936                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3937                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3938                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3939                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3940                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3941                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3942                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3943                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3944                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3945                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3946                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3947                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3948                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3949                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3950                 </fields>
3951                 <links>
3952                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3953                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3954                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3955                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3956                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3957                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3958                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3959                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3960                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3961                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3962                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3963                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3964                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3965                 </links>
3966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3967                         <actions>
3968                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3969                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3970                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3971                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3972                         </actions>
3973                 </permacrud>
3974         </class>
3975         
3976         <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">
3977                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3978                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3979                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3980                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3981                 </fields>
3982                 <links>
3983                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3984                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3985                 </links>
3986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3987                         <actions>
3988                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3989                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3990                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3991                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3992                         </actions>
3993                 </permacrud>
3994         </class>
3995
3996         <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">
3997                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3998                         <field name="bucket" reporter:datatype="link"/>
3999                         <field name="id" reporter:datatype="id" />
4000                         <field name="target_call_number" reporter:datatype="link" />
4001                         <field name="create_time" reporter:datatype="timestamp" />
4002                         <field name="pos" reporter:datatype="int" />
4003                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4004                 </fields>
4005                 <links>
4006                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4007                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4008             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4009                 </links>
4010         </class>
4011         <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">
4012                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4013                         <field name="id" reporter:datatype="id" />
4014                         <field name="item" reporter:datatype="link"/>
4015                         <field name="note" reporter:datatype="text" />
4016                 </fields>
4017                 <links>
4018                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4019                 </links>
4020         </class>
4021         <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">
4022                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4023                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field name="btype" reporter:datatype="text"/>
4025                         <field name="id" reporter:datatype="id" />
4026                         <field name="name" reporter:datatype="text"/>
4027                         <field name="description" reporter:datatype="text"/>
4028                         <field name="owner" reporter:datatype="link"/>
4029                         <field name="pub" reporter:datatype="bool"/>
4030                         <field name="create_time" reporter:datatype="timestamp" />
4031                 </fields>
4032                 <links>
4033                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4034                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4035                 </links>
4036         </class>
4037         <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">
4038                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4039                         <field name="id" reporter:datatype="id" />
4040                         <field name="bucket" reporter:datatype="link"/>
4041                         <field name="note" reporter:datatype="text" />
4042                 </fields>
4043                 <links>
4044                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4045                 </links>
4046         </class>
4047         <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">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4049                         <field name="hold" reporter:datatype="link"/>
4050                         <field name="id" reporter:datatype="id" />
4051                         <field name="target_copy" reporter:datatype="link"/>
4052                 </fields>
4053                 <links>
4054                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4055                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4056                 </links>
4057         </class>
4058         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4059                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4060                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4061                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4062                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4063                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4064                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4065                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4066                 </fields>
4067                 <links>
4068                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4069                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4070                 </links>
4071         </class>
4072         <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">
4073                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4074                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4075                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4076                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4077                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4078                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4079                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4080                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4081                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4082                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4084                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4085                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4086                 </fields>
4087                 <links>
4088                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4089                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4090                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4091                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4092                 </links>
4093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4094             <actions>
4095                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4096                 <retrieve/>
4097                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4098                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4099             </actions>
4100         </permacrud>
4101         </class>
4102         <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">
4103                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4104                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4105                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4106                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4107                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4108             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4109             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4110             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4111                 </fields>
4112                 <links>
4113                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4114                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4115                 </links>
4116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4117             <actions>
4118                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4119                 <retrieve/>
4120                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4121                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4122             </actions>
4123         </permacrud>
4124         </class>
4125         <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">
4126                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4127                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4128             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4129             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4130                 </fields>
4131                 <links>
4132                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4133                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4134                 </links>
4135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4136             <actions>
4137                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4138                                         <context link="lgroup" field="owner" />
4139                 </create>
4140                 <retrieve/>
4141                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4142                                         <context link="lgroup" field="owner" />
4143                 </update>
4144                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4145                                         <context link="lgroup" field="owner" />
4146                 </delete>
4147             </actions>
4148         </permacrud>
4149         </class>
4150
4151     <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">
4152         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4153             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4154             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4155             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4156             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4157         </fields>
4158         <links>
4159             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4160             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4161         </links>
4162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4163             <actions>
4164                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4165                 <retrieve/>
4166                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4167                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4168             </actions>
4169         </permacrud>
4170     </class>
4171
4172         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4173                 <fields>
4174                         <field name="sre_id" oils_persist:virtual="true" />
4175                         <field name="location" oils_persist:virtual="true" />
4176                         <field name="owning_lib" oils_persist:virtual="true" />
4177                         <field name="basic_holdings" oils_persist:virtual="true" />
4178                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4179                         <field name="supplement_holdings" oils_persist:virtual="true" />
4180                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4181                         <field name="index_holdings" oils_persist:virtual="true" />
4182                         <field name="index_holdings_add" oils_persist:virtual="true" />
4183                         <field name="online" oils_persist:virtual="true" />
4184                         <field name="missing" oils_persist:virtual="true" />
4185                         <field name="incomplete" oils_persist:virtual="true" />
4186                 </fields>
4187         </class>
4188
4189         <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">
4190                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4191                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4192                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4193                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4194                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4195                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4196                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4198                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4199                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4200                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4201                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4202                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4203                 </fields>
4204                 <links>
4205                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4206                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4207                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4208                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4209                 </links>
4210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4211                         <actions>
4212                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4213                                 <retrieve/>
4214                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4215                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4216                         </actions>
4217                 </permacrud>
4218         </class>
4219
4220         <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">
4221                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4222                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4223                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4224                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4225                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4226                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4227                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4228                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4229                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4230                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4231                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4232                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4233                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4234                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4235                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4236                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4237                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4238                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4239                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4240                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4241                 </fields>
4242                 <links>
4243                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4244                 </links>
4245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4246                         <actions>
4247                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4248                                         <context link="subscription" field="owning_lib" />
4249                                 </create>
4250                                 <retrieve />
4251                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4252                                         <context link="subscription" field="owning_lib" />
4253                                 </update>
4254                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4255                                         <context link="subscription" field="owning_lib" />
4256                                 </delete>
4257                         </actions>
4258                 </permacrud>
4259         </class>
4260
4261         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4262                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4263                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4264                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4265                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4266                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4267                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4268                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4269                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4270                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4271                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4272                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4273                 </fields>
4274                 <links>
4275                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4276                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4277                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4278                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4279                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4280                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4281                 </links>
4282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4283                         <actions>
4284                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4285                                 <retrieve />
4286                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4287                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4288                         </actions>
4289                 </permacrud>
4290         </class>
4291
4292         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4293                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4295                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4296                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4297                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4298                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4299                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4300                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4301                 </fields>
4302                 <links>
4303                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4304                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4305                 </links>
4306         </class>
4307
4308         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4309                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4310                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4311                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4312                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4313                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4314                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4315                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4316                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4317                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4318                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4319                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4320                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4321                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4322                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4323                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4326                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4327                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4328                 </fields>
4329                 <links>
4330                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4331                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4332                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4333                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4334                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4335                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4336                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4337                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4338                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4339                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4340                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4341                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4342                 </links>
4343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4344                         <actions>
4345                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4346                                 <retrieve />
4347                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4348                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4349                         </actions>
4350                 </permacrud>
4351         </class>
4352
4353         <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">
4354                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4356                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4357                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4358                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4359                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4360                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4361                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4362                 </fields>
4363                 <links>
4364                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4365                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4366                 </links>
4367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4368                         <actions>
4369                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4370                                         <context link="distribution" field="holding_lib" />
4371                                 </create>
4372                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4373                                         <context link="distribution" field="holding_lib" />
4374                                 </retrieve>
4375                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4376                                         <context link="distribution" field="holding_lib" />
4377                                 </update>
4378                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4379                                         <context link="distribution" field="holding_lib" />
4380                                 </delete>
4381                         </actions>
4382                 </permacrud>
4383         </class>
4384
4385         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4386                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4387                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4388                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4389                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4390                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4391                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4392                 </fields>
4393                 <links>
4394                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4395                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4396                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4397                 </links>
4398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4399                         <actions>
4400                                 <create permission="ADMIN_SERIAL_STREAM">
4401                                         <context link="distribution" field="holding_lib" />
4402                                 </create>
4403                                 <retrieve />
4404                                 <update permission="ADMIN_SERIAL_STREAM">
4405                                         <context link="distribution" field="holding_lib" />
4406                                 </update>
4407                                 <delete permission="ADMIN_SERIAL_STREAM">
4408                                         <context link="distribution" field="holding_lib" />
4409                                 </delete>
4410                         </actions>
4411                 </permacrud>
4412         </class>
4413
4414         <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">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4416                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4417                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4418                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4419                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4420                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4421                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4422                 </fields>
4423                 <links>
4424                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4425                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4426                 </links>
4427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4428                         <actions>
4429                                 <create permission="ADMIN_SERIAL_STREAM">
4430                                         <context link="stream" jump="distribution" field="holding_lib" />
4431                                 </create>
4432                                 <retrieve permission="RECEIVE_SERIAL">
4433                                         <context link="stream" jump="distribution" field="holding_lib" />
4434                                 </retrieve>
4435                                 <update permission="ADMIN_SERIAL_STREAM">
4436                                         <context link="stream" jump="distribution" field="holding_lib" />
4437                                 </update>
4438                                 <delete permission="ADMIN_SERIAL_STREAM">
4439                                         <context link="stream" jump="distribution" field="holding_lib" />
4440                                 </delete>
4441                         </actions>
4442                 </permacrud>
4443         </class>
4444
4445         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4446                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4447                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4448                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4449                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4450                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4451                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4452                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4453                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4454                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4455                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4456                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4457                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4458                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4459                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4460                 </fields>
4461                 <links>
4462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4463                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4464                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4465                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4466                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4467                 </links>
4468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4469                         <actions>
4470                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4471                                         <context link="subscription" field="owning_lib" />
4472                                 </create>
4473                                 <retrieve/>
4474                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4475                                         <context link="subscription" field="owning_lib" />
4476                                 </update>
4477                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4478                                         <context link="subscription" field="owning_lib" />
4479                                 </delete>
4480                         </actions>
4481                 </permacrud>
4482         </class>
4483
4484         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4485                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4486                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4487                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4488                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4489                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4490                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4491                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4492                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4493                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4494                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4495                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4496                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4497                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4498                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4499                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4500                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4501                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4502                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4503                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4504                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4505                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4506                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4507                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4508                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4509                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4510                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4511                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4512                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4513                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4514                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4515                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4516                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4517                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4518                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4519                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4520                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4521                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4522                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4523                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4524                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4525                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4526                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4527                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4528                 </fields>
4529                 <links>
4530                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4531                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4532                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4533                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4534                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4535                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4536                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4537                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4538                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4539                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4540                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4541                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4542                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4543                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4544                 </links>
4545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4546                         <actions>
4547                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4548                                 <retrieve/>
4549                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4550                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4551                         </actions>
4552                 </permacrud>
4553         </class>
4554
4555         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4557                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4558                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4559                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4560                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4561                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4562                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4563                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4564                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4565                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4566                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4567                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4568                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4569                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4570                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4571                 </fields>
4572                 <links>
4573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4574                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4575                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4576                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4577                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4578                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4579                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4580                 </links>
4581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4582                         <actions>
4583                                 <create permission="ADMIN_SERIAL_ITEM">
4584                                         <context link="stream" jump="distribution" field="holding_lib" />
4585                                 </create>
4586                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4587                                         <context link="stream" jump="distribution" field="holding_lib" />
4588                                 </retrieve>
4589                                 <update permission="ADMIN_SERIAL_ITEM">
4590                                         <context link="stream" jump="distribution" field="holding_lib" />
4591                                 </update>
4592                                 <delete permission="ADMIN_SERIAL_ITEM">
4593                                         <context link="stream" jump="distribution" field="holding_lib" />
4594                                 </delete>
4595                         </actions>
4596                 </permacrud>
4597         </class>
4598
4599         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4601                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4602                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4603                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4604                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4605                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4606                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4607                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4608                 </fields>
4609                 <links>
4610                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4611                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4612                 </links>
4613                 <!-- Not available via PCRUD at this time -->
4614         </class>
4615         <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">
4616                 <fields>
4617                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4618                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4619                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4620                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4621                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4622                 </fields>
4623                 <links>
4624                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4625                 </links>
4626         </class>
4627         <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">
4628                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4629                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4630                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4631                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4632                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4633                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4634                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4635                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4636                 </fields>
4637                 <links>
4638                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4639                 </links>
4640         </class>
4641         <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">
4642                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4643                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4644                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4645                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4646                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4647                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4648                 </fields>
4649                 <links>
4650                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4651                 </links>
4652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4653                         <actions>
4654                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4655                                         <context link="distribution" field="holding_lib" />
4656                                 </create>
4657                                 <retrieve/>
4658                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4659                                         <context link="distribution" field="holding_lib" />
4660                                 </update>
4661                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4662                                         <context link="distribution" field="holding_lib" />
4663                                 </delete>
4664                         </actions>
4665                 </permacrud>
4666         </class>
4667
4668         <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">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4670                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4671                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4672                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4673                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4674                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4675                 </fields>
4676                 <links>
4677                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4678                 </links>
4679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4680                         <actions>
4681                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4682                                         <context link="distribution" field="holding_lib" />
4683                                 </create>
4684                                 <retrieve/>
4685                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4686                                         <context link="distribution" field="holding_lib" />
4687                                 </update>
4688                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4689                                         <context link="distribution" field="holding_lib" />
4690                                 </delete>
4691                         </actions>
4692                 </permacrud>
4693         </class>
4694
4695         <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">
4696                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4697                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4698                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4699                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4700                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4701                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4702                 </fields>
4703                 <links>
4704                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4705                 </links>
4706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4707                         <actions>
4708                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4709                                         <context link="distribution" field="holding_lib" />
4710                                 </create>
4711                                 <retrieve/>
4712                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4713                                         <context link="distribution" field="holding_lib" />
4714                                 </update>
4715                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4716                                         <context link="distribution" field="holding_lib" />
4717                                 </delete>
4718                         </actions>
4719                 </permacrud>
4720         </class>
4721
4722         <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">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4724                         <field name="id" reporter:datatype="id" />
4725                         <field name="owning_copy" reporter:datatype="link"/>
4726                         <field name="stat_cat" reporter:datatype="link"/>
4727                         <field name="stat_cat_entry" reporter:datatype="link"/>
4728                 </fields>
4729                 <links>
4730                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4731                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4732                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4733                 </links>
4734         </class>
4735         <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">
4736                 <fields oils_persist:primary="code">
4737                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4738                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4739                 </fields>
4740                 <links/>
4741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4742             <actions>
4743                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4744                 <retrieve/>
4745                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4746                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4747             </actions>
4748         </permacrud>
4749         </class>
4750         <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">
4751                 <fields oils_persist:primary="code">
4752                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4753                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4754                 </fields>
4755                 <links/>
4756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4757             <actions>
4758                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4759                 <retrieve/>
4760                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4761                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4762             </actions>
4763         </permacrud>
4764         </class>
4765         <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">
4766                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4767                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4768                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4769                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4770                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4771                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4772                 </fields>
4773                 <links>
4774             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4775         </links>
4776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777             <actions>
4778                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4779                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4780                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4781                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4782             </actions>
4783         </permacrud>
4784         </class>
4785         <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">
4786                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4787                         <field name="id" reporter:datatype="id" />
4788                         <field name="name" reporter:datatype="text"/>
4789                 </fields>
4790                 <links/>
4791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792             <actions>
4793                 <create permission="CREATE_LASSO" global_required="true"/>
4794                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4795                 <update permission="UPDATE_LASSO" global_required="true"/>
4796                 <delete permission="DELETE_LASSO" global_required="true"/>
4797             </actions>
4798         </permacrud>
4799         </class>
4800         <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">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4802                         <field name="id" reporter:datatype="id" />
4803                         <field name="lasso" reporter:datatype="link"/>
4804                         <field name="org_unit" reporter:datatype="org_unit"/>
4805                 </fields>
4806                 <links>
4807                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4808                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4809                 </links>
4810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4811             <actions>
4812                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4813                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4814                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4815                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4816             </actions>
4817         </permacrud>
4818         </class>
4819         <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">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4821                         <field name="id" reporter:datatype="id" />
4822                         <field name="from_org" reporter:datatype="org_unit"/>
4823                         <field name="to_org" reporter:datatype="org_unit"/>
4824                         <field name="prox" reporter:datatype="int" />
4825                 </fields>
4826                 <links>
4827                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4828                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4829                 </links>
4830         </class>
4831         <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">
4832                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4833                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4834                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4835                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4836                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4837                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4838                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4839                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4840                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4841                 </fields>
4842                 <links/>
4843         </class>
4844         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4845                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4846                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4848                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4849                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4850                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4851                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4852                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4853                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4854                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4855                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4856                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4857                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4858                 </fields>
4859                 <links>
4860                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4861                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4862                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4863                 </links>
4864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4865             <actions>
4866                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4867                 <retrieve/>
4868                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4869                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4870             </actions>
4871         </permacrud>
4872         </class>
4873         <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">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4875                         <field name="address_type"  reporter:datatype="text"/>
4876                         <field name="city"  reporter:datatype="text"/>
4877                         <field name="country"  reporter:datatype="text"/>
4878                         <field name="county"  reporter:datatype="text"/>
4879                         <field name="id" reporter:datatype="id" />
4880                         <field name="org_unit" reporter:datatype="org_unit"/>
4881                         <field name="post_code"  reporter:datatype="text"/>
4882                         <field name="state"  reporter:datatype="text"/>
4883                         <field name="street1"  reporter:datatype="text"/>
4884                         <field name="street2"  reporter:datatype="text"/>
4885                         <field name="valid" reporter:datatype="bool"/>
4886                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4887                 </fields>
4888                 <links>
4889                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4890                 </links>
4891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4892             <actions>
4893                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4894                 <retrieve/>
4895                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4896                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4897             </actions>
4898         </permacrud>
4899         </class>
4900         <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">
4901                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
4902                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4903                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4904                         <field name="query_text" reporter:datatype="text"/>
4905                 </fields>
4906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4907             <actions>
4908                 <retrieve/>
4909             </actions>
4910         </permacrud>
4911         </class>
4912
4913         <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">
4914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
4915                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4916                         <field name="owner" reporter:datatype="org_unit"/>
4917                         <field name="code" reporter:datatype="text"/>
4918                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4919                         <field name="create_date" reporter:datatype="timestamp"/>
4920                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4921                 </fields>
4922                 <links>
4923                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4924                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
4925                 </links>
4926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4927             <actions>
4928                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4929                 <retrieve/>
4930                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4931                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4932             </actions>
4933         </permacrud>
4934         </class>
4935         <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">
4936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
4937                         <field name="id" reporter:datatype="id"/>
4938                         <field name="grp" reporter:datatype="link"/>
4939                         <field name="pos" reporter:datatype="int"/>
4940                         <field name="query" reporter:datatype="link"/>
4941                 </fields>
4942                 <links>
4943                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
4944                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
4945                 </links>
4946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4947             <actions>
4948                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
4949                     <context link="grp" field="owner"/>
4950                 </create>
4951                 <retrieve/>
4952                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
4953                     <context link="grp" field="owner"/>
4954                 </update>
4955                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
4956                     <context link="grp" field="owner"/>
4957                 </delete>
4958             </actions>
4959         </permacrud>
4960         </class>
4961
4962         <!-- A note: Please update alhr and ahopl when updating ahr -->
4963         <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">
4964                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4965                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4966                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4967                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4968                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4969                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4970                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4971                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4972                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4973                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4974                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4975                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4976                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4977                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4978                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4979                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
4980                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4981                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4983                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4984                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4985                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4986                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4987                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4988                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4989                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4990                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4991                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4992                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4993                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4994                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4995                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4996                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4997                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4998                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4999                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5000                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5001                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5002                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5003                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5004                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5005                 </fields>
5006                 <links>
5007                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5009                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5010                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5011                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5012                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5013                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5014                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5015                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5016                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5017                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5018                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5019                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5020                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5021                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5022                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5023                 </links>
5024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5025                         <actions>
5026                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5027                         </actions>
5028                 </permacrud>
5029         </class>
5030         <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">
5031                 <oils_persist:source_definition><![CDATA[
5032                 SELECT
5033                         ahr.*,
5034                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5035                                 copy_location_order_position,
5036                         CASE WHEN au.alias IS NOT NULL THEN
5037                                 au.alias
5038                         ELSE
5039                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5040                                         COALESCE(au.family_name, ''),
5041                                         COALESCE(au.suffix, ''),
5042                                         ', ',
5043                                         COALESCE(au.prefix, ''),
5044                                         COALESCE(au.first_given_name, ''),
5045                                         COALESCE(au.second_given_name, '')
5046                                 ], ' '), E'\\s+,', ',')
5047                         END AS usr_display_name,
5048                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5049                                 AS call_number_label,
5050                         siss.label AS issuance_label,
5051                         (ahr.usr <> ahr.requestor) AS is_staff_hold
5052                 FROM action.hold_request ahr
5053                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5054                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5055                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5056                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5057                 JOIN actor.usr au ON (au.id = ahr.usr)
5058                 JOIN (
5059                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5060                         FROM asset.copy_location
5061                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5062                 LEFT JOIN actor.usr_standing_penalty ausp 
5063                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5064                 LEFT JOIN config.standing_penalty csp
5065                         ON (
5066                                 csp.id = ausp.standing_penalty AND 
5067                                 csp.block_list LIKE '%CAPTURE%' AND (
5068                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5069                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5070                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5071                                         )
5072                                 )
5073                         )
5074                 LEFT JOIN serial.issuance siss
5075                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5076                 LEFT JOIN asset.copy_location_order acplo
5077                         ON (acp.location = acplo.location AND
5078                                 acp.circ_lib = acplo.org)
5079                 WHERE
5080                         ahr.capture_time IS NULL AND
5081                         ahr.cancel_time IS NULL AND
5082                         csp.id IS NULL AND
5083                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5084                 ]]></oils_persist:source_definition>
5085                 <fields oils_persist:primary="id">
5086                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5087                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5088                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5089                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5090                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5091                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5092                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5093                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5094                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5096                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5097                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5098                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5099                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5100                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5101                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5102                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5103                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5104                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5105                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5106                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5107                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5108                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5109                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5110                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5111                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5112                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5113                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5114                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5115                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5116                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5117                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5118                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5119                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5120                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5121                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5122                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5123                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5124                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5125                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5126                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5127                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5128                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5129                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5130                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5131                 </fields>
5132                 <links>
5133                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5134                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5135                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5136                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5137                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5138                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5139                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5140                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5141                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5142                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5143                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5144                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5145                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5146                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5147                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5148                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5149                 </links>
5150                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5151                         <actions>
5152                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5153                         </actions>
5154                 </permacrud>
5155         </class>
5156         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5157                 <oils_persist:source_definition>
5158                         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)
5159                 </oils_persist:source_definition>
5160                 <fields oils_persist:primary="id">
5161                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5162                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5163                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5164                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5165                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5166                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5168                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5169                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5170                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5171                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5172                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5173                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5174                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5175                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5176                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5177                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5179                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5180                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5181                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5182                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5183                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5184                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5185                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5186                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5187                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5188                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5189                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5190                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5191                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5192                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5193                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5194                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5195                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5196                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5197                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5198                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5199                 </fields>
5200                 <links>
5201                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5202                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5203                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5204                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5205                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5206                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5207                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5208                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5209                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5210                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5211                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5212                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5213                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5214                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5215                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5216                 </links>
5217         </class>
5218
5219         <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">
5220                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5221                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5222                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5223                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5224                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5225                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5226                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5227                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5228                 </fields>
5229                 <links>
5230                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5231                 </links>
5232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5233                         <actions>
5234                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5235                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5236                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5237                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5238                         </actions>
5239                 </permacrud>
5240         </class>
5241         <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">
5242                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5243                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5244                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5245                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5246                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5247                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5248                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5249                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5250                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5251                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5252                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5253                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5254                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5255                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5256                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5257                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5258                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5259                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5260                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5261                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5262                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5270                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5271                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5272                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5273                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5274                 </fields>
5275                 <links>
5276                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5277                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5278                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5279                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5280                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5281                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5282                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5283                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5284                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5285                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5286                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5287                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5288                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5289                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5290                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5291                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5292                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5293                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5294                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5295                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5296                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5297                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5298                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5299                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5300                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5301                 </links>
5302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5303             <actions>
5304                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5305                 <retrieve />
5306                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5307                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5308             </actions>
5309         </permacrud>
5310         </class>
5311         <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">
5312                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5313                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5314                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5315                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5316                 </fields>
5317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5318                         <actions>
5319                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5320                                 <retrieve/>
5321                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5322                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5323                         </actions>
5324                 </permacrud>
5325         </class>
5326         <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">
5327                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5328                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5329                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5330                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5331                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5332                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5333                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5334                 </fields>
5335                 <links>
5336                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5337                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5338                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5339                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5340                 </links>
5341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5342                         <actions>
5343                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5344                                 <retrieve/>
5345                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5346                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5347                         </actions>
5348                 </permacrud>
5349         </class>
5350         <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">
5351                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5352                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5353                         <field name="btype" reporter:datatype="text"/>
5354                         <field name="id" reporter:datatype="id" />
5355                         <field name="name"  reporter:datatype="text"/>
5356                         <field name="description" reporter:datatype="text"/>
5357                         <field name="owner" reporter:datatype="link"/>
5358                         <field name="pub" reporter:datatype="bool"/>
5359                         <field name="create_time" reporter:datatype="timestamp" />
5360                 </fields>
5361                 <links>
5362                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5363                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5364                 </links>
5365         </class>
5366         <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">
5367                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5368                         <field name="id" reporter:datatype="id" />
5369                         <field name="bucket" reporter:datatype="link"/>
5370                         <field name="note" reporter:datatype="text" />
5371                 </fields>
5372                 <links>
5373                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5374                 </links>
5375         </class>
5376         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5377                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5378                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5379                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5380                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5381                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5382                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5383                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5384                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5385                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5386                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5387                 </fields>
5388                 <links>
5389                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5390                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5391                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5392                 </links>
5393         </class>
5394         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5396                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5397                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5398                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5399                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5400                 </fields>
5401                 <links>
5402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5403                 </links>
5404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5405                         <actions>
5406                                 <retrieve permission="VIEW_USER">
5407                                         <context link="usr" field="home_ou" />
5408                                 </retrieve>
5409                         </actions>
5410                 </permacrud>
5411         </class>
5412     <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">
5413         <fields oils_persist:primary="field">
5414             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5415             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5416             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5417         </fields>
5418         <links/>
5419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5420             <actions>
5421                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5422                 <retrieve />
5423                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5424                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5425             </actions>
5426         </permacrud>
5427     </class>
5428         <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">
5429                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5430                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5431                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5432                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5433                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5434                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5435                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5436                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5437                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5438                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5439                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5440                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5441                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5442                 </fields>
5443                 <links>
5444                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5445                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5446                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5447                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5448                 </links>
5449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5450             <actions>
5451                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5452                 <retrieve />
5453                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5454                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5455             </actions>
5456         </permacrud>
5457         </class>
5458         <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">
5459                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5460                         <field name="field" reporter:datatype="link"/>
5461                         <field name="id" reporter:datatype="id" />
5462                         <field name="source" reporter:datatype="link"/>
5463                         <field name="value"  reporter:datatype="text"/>
5464                 </fields>
5465                 <links>
5466                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5467                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5468                 </links>
5469         </class>
5470         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5471                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5472                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5473                         <field name="btype" reporter:datatype="text"/>
5474                         <field name="id" reporter:datatype="id" />
5475                         <field name="name"  reporter:datatype="text"/>
5476                         <field name="description" reporter:datatype="text"/>
5477                         <field name="owner" reporter:datatype="link"/>
5478                         <field name="pub" reporter:datatype="bool"/>
5479                         <field name="create_time" reporter:datatype="timestamp" />
5480                 </fields>
5481                 <links>
5482                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5483                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5484                 </links>
5485         </class>
5486         <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">
5487                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5488                         <field name="id" reporter:datatype="id" />
5489                         <field name="bucket" reporter:datatype="link"/>
5490                         <field name="note" reporter:datatype="text" />
5491                 </fields>
5492                 <links>
5493                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5494                 </links>
5495         </class>
5496         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5497                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5498                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5499                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5500                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5501                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5502                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5503                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5504                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5505                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5506                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5507                 </fields>
5508                 <links>
5509                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5510                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5511                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5512                 </links>
5513         </class>
5514         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5516                         <field name="id" reporter:datatype="id" />
5517                         <field name="ind1" />
5518                         <field name="ind2" />
5519                         <field name="record" />
5520                         <field name="subfield" />
5521                         <field name="tag" />
5522                         <field name="value" />
5523                 </fields>
5524                 <links>
5525                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5526                 </links>
5527         </class>
5528         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5529                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5530                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5531                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5532                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5533                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5534                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5535                 </fields>
5536                 <links>
5537                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5538                 </links>
5539         </class>
5540         <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">
5541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5542                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5543                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5544                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5545                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5546                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5547                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5548                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5549                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5550                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5551                 </fields>
5552                 <links>
5553                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5554                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5555                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5556                 </links>
5557         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558             <actions>
5559                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5560                 <retrieve/>
5561                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5562                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5563             </actions>
5564         </permacrud>
5565         </class>
5566         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5567                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5568                         <field name="create_date" reporter:datatype="timestamp"/>
5569                         <field name="creator" reporter:datatype="link"/>
5570                         <field name="edit_date" reporter:datatype="timestamp"/>
5571                         <field name="editor" reporter:datatype="link"/>
5572                         <field name="id" reporter:datatype="id" />
5573                         <field name="pub" reporter:datatype="bool"/>
5574                         <field name="record" reporter:datatype="link"/>
5575                         <field name="value"  reporter:datatype="text"/>
5576                 </fields>
5577                 <links>
5578                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5579                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5580                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5581                 </links>
5582         </class>
5583         <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">
5584                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5585                         <field name="balance_owed" reporter:datatype="money" />
5586                         <field name="total_owed" reporter:datatype="money" />
5587                         <field name="total_paid" reporter:datatype="money" />
5588                         <field name="usr" reporter:datatype="link"/>
5589                 </fields>
5590                 <links>
5591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5592                 </links>
5593         </class>
5594         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5595                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5596                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5597                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5598                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5599                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5600                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5601                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5602                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5603                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5604                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5605                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5606                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5607                 </fields>
5608                 <links>
5609                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5610                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5611                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5612                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5613                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5614                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5615                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5616                 </links>
5617         </class>
5618         <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">
5619                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5620                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5621                         <field name="quality" reporter:datatype="int" />
5622                         <field name="source" reporter:datatype="text"/>
5623                         <field name="transcendant" reporter:datatype="bool"/>
5624                         <field name="can_have_copies" reporter:datatype="bool"/>
5625                 </fields>
5626                 <links/>
5627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5628             <actions>
5629                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5630                 <retrieve/>
5631                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5632                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5633             </actions>
5634         </permacrud>
5635         </class>
5636         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5637                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5638                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5639                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5640                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5641                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5642                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5643                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5644                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5645                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5646                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5647                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5648                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5649                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5650                 </fields>
5651                 <links>
5652                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5653                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5654                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5655                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5656                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5657                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5658                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5659                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5660                 </links>
5661         </class>
5662         <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">
5663                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5664                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5665                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5666                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5667                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5668                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5669                 </fields>
5670                 <links>
5671                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5672                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5673                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5674                 </links>
5675         </class>
5676         <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">
5677                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5678                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5679                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5680                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5681                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5682                 </fields>
5683                 <links>
5684                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5685                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5686                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5687                 </links>
5688         </class>
5689         <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">
5690                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5691                         <field name="bucket" reporter:datatype="link"/>
5692                         <field name="id" reporter:datatype="id" />
5693                         <field name="target_user" reporter:datatype="link"/>
5694                         <field name="create_time" reporter:datatype="timestamp" />
5695                         <field name="pos" reporter:datatype="int" />
5696                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5697                 </fields>
5698                 <links>
5699                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5700                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5701             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5702                 </links>
5703         </class>
5704         <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">
5705                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5706                         <field name="id" reporter:datatype="id" />
5707                         <field name="item" reporter:datatype="link"/>
5708                         <field name="note" reporter:datatype="text" />
5709                 </fields>
5710                 <links>
5711                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5712                 </links>
5713         </class>
5714         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5715                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5716                         <field name="balance_owed" reporter:datatype="money" />
5717                         <field name="total_owed" reporter:datatype="money" />
5718                         <field name="total_paid" reporter:datatype="money" />
5719                         <field name="usr" reporter:datatype="link"/>
5720                 </fields>
5721                 <links>
5722                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5723                 </links>
5724         </class>
5725         <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">
5726                 <fields oils_persist:primary="code" oils_persist:sequence="">
5727                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5728                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5729                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5730                 </fields>
5731                 <links/>
5732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5733             <actions>
5734                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5735                 <retrieve/>
5736                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5737                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5738             </actions>
5739         </permacrud>
5740         </class>
5741         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5742                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5743                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5744                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5745                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5746                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5747                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5748                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5749                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5750                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5751                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5752                 </fields>
5753                 <links>
5754                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5755                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5756                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5757                 </links>
5758         </class>
5759         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5760                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5761                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5762                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5763                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5764                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5765                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5766                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5768                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5769                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5770                 </fields>
5771                 <links>
5772                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5773                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5774                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5775                 </links>
5776         </class>
5777         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5778                 <fields oils_persist:primary="id" oils_persist:sequence="">
5779                         <field name="checkin_lib" reporter:datatype="link"/>
5780                         <field name="checkin_staff" reporter:datatype="link"/>
5781                         <field name="checkin_time" reporter:datatype="timestamp"/>
5782                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5783                         <field name="circ_staff" reporter:datatype="link"/>
5784                         <field name="desk_renewal" reporter:datatype="bool"/>
5785                         <field name="due_date" reporter:datatype="timestamp"/>
5786                         <field name="duration" reporter:datatype="interval"/>
5787                         <field name="duration_rule" reporter:datatype="link"/>
5788                         <field name="fine_interval" reporter:datatype="interval"/>
5789                         <field name="id" reporter:datatype="id" />
5790                         <field name="max_fine" reporter:datatype="money" />
5791                         <field name="max_fine_rule" reporter:datatype="link"/>
5792                         <field name="opac_renewal" reporter:datatype="bool"/>
5793                         <field name="phone_renewal" reporter:datatype="bool"/>
5794                         <field name="recurring_fine" reporter:datatype="money" />
5795                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5796                         <field name="renewal_remaining" reporter:datatype="int" />
5797             <field name="grace_period" reporter:datatype="interval" />
5798                         <field name="stop_fines" reporter:datatype="text"/>
5799                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5800                         <field name="target_copy" reporter:datatype="link"/>
5801                         <field name="usr" reporter:datatype="link"/>
5802                         <field name="xact_finish" reporter:datatype="timestamp" />
5803                         <field name="xact_start" reporter:datatype="timestamp" />
5804                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5805                 </fields>
5806                 <links>
5807                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5808                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5809                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5810                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5811                 </links>
5812         </class>
5813         <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">
5814                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5815                         <field name="field" reporter:datatype="link"/>
5816                         <field name="id" reporter:datatype="id" />
5817                         <field name="source" reporter:datatype="link"/>
5818                         <field name="value" reporter:datatype="text"/>
5819                 </fields>
5820                 <links>
5821                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5822                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5823                 </links>
5824         </class>
5825         <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">
5826                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5827                         <field name="high" reporter:datatype="money" />
5828                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5829                         <field name="low" reporter:datatype="money" />
5830                         <field name="name" reporter:datatype="text"/>
5831                         <field name="normal" reporter:datatype="money" />
5832                         <field name="recurrence_interval" reporter:datatype="interval"/>
5833             <field name="grace_period" reporter:datatype="interval" />
5834                 </fields>
5835                 <links/>
5836         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5837             <actions>
5838                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5839                 <retrieve/>
5840                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5841                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5842             </actions>
5843         </permacrud>
5844         </class>
5845         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5846                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5847                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5848                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5849                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5850                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5851                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5852                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5853                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5854                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5855                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5856                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5857                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5858                 </fields>
5859                 <links>
5860                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5861                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5862                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5863                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5864                 </links>
5865         </class>
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5868                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5869                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5870                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5871                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5872                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5873                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5874                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5875                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5876                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5877                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5878                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5879                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5880                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5881                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5882                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5883                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5884                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5885                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5886                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5887                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5888                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5889                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5890                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5891                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5892                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5893                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5894                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5895                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5896                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5897                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5898                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5899                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5900                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5901                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5902                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5903                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5904                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5905                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5906                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5907                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5908                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5909                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5910                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5911                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5912                 </fields>
5913                 <links>
5914                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5915                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5916                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5917                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5918                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5919                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5920                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5921                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5922                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5923                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5924                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5925                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5926                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5927                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5928                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5929                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5930                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5931                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5932                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5933                 </links>
5934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5935             <actions>
5936                 <create permission="CREATE_COPY">
5937                     <context link="call_number" field="owning_lib"/>
5938                 </create>
5939                 <retrieve/>
5940                 <update permission="UPDATE_COPY">
5941                     <context link="call_number" field="owning_lib"/>
5942                 </update>
5943                 <delete permission="DELETE_COPY">
5944                     <context link="call_number" field="owning_lib"/>
5945                 </delete>
5946             </actions>
5947         </permacrud>
5948         </class>
5949
5950         <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">
5951                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5952                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5953                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5954                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5955                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5956                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5957                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5958                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5959                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5960                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5961                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5962                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5963                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5964                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5965                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5966                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5967                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5968                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5969                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5970                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5971                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5972                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5973                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5974                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5975                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5976                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5977                 </fields>
5978                 <links>
5979                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5980                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5981                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5982                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5983                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5985                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5986                 </links>
5987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5988                         <actions>
5989                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5990                                 <retrieve />
5991                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5992                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5993                         </actions>
5994                 </permacrud>
5995         </class>
5996
5997         <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">
5998                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5999                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6000                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6001                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6002                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6003                 </fields>
6004                 <links/>
6005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6006             <actions>
6007                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6008                 <retrieve/>
6009                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6010                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6011             </actions>
6012         </permacrud>
6013         </class>
6014         <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">
6015                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6016                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6017                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6018                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6019                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6020                 </fields>
6021                 <links/>
6022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6023             <actions>
6024                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6025                 <retrieve/>
6026                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6027                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6028             </actions>
6029         </permacrud>
6030         </class>
6031         <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">
6032                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6033                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6034                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6035                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6036                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6037                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6038                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6039                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6040                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6041                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6042                 </fields>
6043                 <links>
6044                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6045                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6046                 </links>
6047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6048             <actions>
6049                 <create permission="CREATE_PERM" global_required="true"/>
6050                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6051                 <update permission="UPDATE_PERM" global_required="true"/>
6052                 <delete permission="DELETE_PERM" global_required="true"/>
6053             </actions>
6054         </permacrud>
6055         </class>
6056         <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">
6057                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6058                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6059                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6060                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6061                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6062                 </fields>
6063                 <links>
6064                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6065                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6066                 </links>
6067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6068             <actions>
6069                 <create permission="ADMIN_SURVEY">
6070                     <context link="question" jump="survey" field="owner"/>
6071                 </create>
6072                 <retrieve/>
6073                 <update permission="ADMIN_SURVEY">
6074                     <context link="question" jump="survey" field="owner"/>
6075                 </update>
6076                 <delete permission="ADMIN_SURVEY">
6077                     <context link="question" jump="survey" field="owner"/>
6078                 </delete>
6079             </actions>
6080         </permacrud>
6081         </class>
6082         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6083                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6084                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6085                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6086                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6087                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6088                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6089                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6090                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6091                 </fields>
6092                 <links>
6093                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6094                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6095                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6096                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6097                 </links>
6098         </class>
6099         <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">
6100                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6101                         <field name="balance_owed" reporter:datatype="money" />
6102                         <field name="total_owed" reporter:datatype="money" />
6103                         <field name="total_paid" reporter:datatype="money" />
6104                         <field name="usr" reporter:datatype="link"/>
6105                 </fields>
6106                 <links>
6107                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6108                 </links>
6109         </class>
6110         <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">
6111                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6112                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6113                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6114                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6115                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6116                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6117                 </fields>
6118                 <links>
6119                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6120                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6121                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6122                 </links>
6123         </class>
6124         <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">
6125                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6126                         <field name="field" reporter:datatype="link"/>
6127                         <field name="id" reporter:datatype="id" />
6128                         <field name="source" reporter:datatype="link"/>
6129                         <field name="value" reporter:datatype="text"/>
6130                 </fields>
6131                 <links>
6132                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6133                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6134                 </links>
6135         </class>
6136         <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">
6137                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6138                         <field name="field" reporter:datatype="link"/>
6139                         <field name="id" reporter:datatype="id" />
6140                         <field name="source" reporter:datatype="link"/>
6141                         <field name="value" reporter:datatype="text"/>
6142                 </fields>
6143                 <links>
6144                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6145                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6146                 </links>
6147         </class>
6148         <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">
6149                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6150                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6151                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6152                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6153                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6154                 </fields>
6155                 <links>
6156                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6157                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6158                 </links>
6159         </class>
6160         <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">
6161                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6162                         <field name="depth" reporter:datatype="int" />
6163                         <field name="grantable" reporter:datatype="bool"/>
6164                         <field name="grp" reporter:datatype="link"/>
6165                         <field name="id" reporter:datatype="id" />
6166                         <field name="perm" reporter:datatype="link"/>
6167                 </fields>
6168                 <links>
6169                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6170                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6171                 </links>
6172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6173             <actions>
6174                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6175                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6176                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6177                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6178             </actions>
6179         </permacrud>
6180         </class>
6181         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6182                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6183                         <field name="items" oils_persist:virtual="true" />
6184                         <field name="btype" reporter:datatype="text"/>
6185                         <field name="id" reporter:datatype="id" />
6186                         <field name="name" reporter:datatype="text"/>
6187                         <field name="description" reporter:datatype="text"/>
6188                         <field name="owner" reporter:datatype="link"/>
6189                         <field name="pub" reporter:datatype="bool"/>
6190                         <field name="create_time" reporter:datatype="timestamp" />
6191                 </fields>
6192                 <links>
6193                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6194                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6195                 </links>
6196         </class>
6197         <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">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6199                         <field name="id" reporter:datatype="id" />
6200                         <field name="bucket" reporter:datatype="link"/>
6201                         <field name="note" reporter:datatype="text" />
6202                 </fields>
6203                 <links>
6204                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6205                 </links>
6206         </class>
6207         <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">
6208                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6209                         <field name="id" reporter:datatype="int" />
6210                         <field name="usr" reporter:datatype="link"/>
6211                         <field name="work_ou" reporter:datatype="link"/>
6212                 </fields>
6213                 <links>
6214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6215                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6216                 </links>
6217         </class>
6218         <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">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6220                         <field name="depth" reporter:datatype="int"/>
6221                         <field name="grantable" reporter:datatype="bool"/>
6222                         <field name="id" reporter:datatype="id" />
6223                         <field name="perm" reporter:datatype="link"/>
6224                         <field name="usr" reporter:datatype="link"/>
6225                 </fields>
6226                 <links>
6227                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6228                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6229                 </links>
6230         </class>
6231         <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">
6232                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6233                         <field name="object_id" reporter:datatype="text"/>
6234                         <field name="grantable" reporter:datatype="bool"/>
6235                         <field name="id" reporter:datatype="id" />
6236                         <field name="perm" reporter:datatype="link"/>
6237                         <field name="usr" reporter:datatype="link"/>
6238                         <field name="object_type" reporter:datatype="text"/>
6239                 </fields>
6240                 <links>
6241                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6242                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6243                 </links>
6244         </class>
6245         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6246                 <fields oils_persist:primary="id" oils_persist:sequence="">
6247                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6248                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6249                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6250                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6251                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6252                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6253                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6254                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6255                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6256                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6257                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6258                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6260                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6261                 </fields>
6262                 <links>
6263                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6264                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6265                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6266                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6267                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6268                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6269                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6270                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6271                 </links>
6272         </class>
6273         <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">
6274                 <fields oils_persist:primary="id" oils_persist:sequence="">
6275                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6276                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6277                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6278                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6279                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6280                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6281                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6282                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6283                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6284                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6285                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6286                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6287                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6288                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6289                 </fields>
6290                 <links>
6291                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6292                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6293                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6294                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6295                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6296                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6297                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6298                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6299                 </links>
6300         </class>
6301         <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">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="">
6303                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6304                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6305                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6306                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6307                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6308                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6309                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6310                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6311                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6312                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6313                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6314                 </fields>
6315                 <links>
6316                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6317                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6318                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6319                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6320                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6321                 </links>
6322         </class>
6323         <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">
6324                 <fields oils_persist:primary="id" oils_persist:sequence="">
6325                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6326                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6327                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6328                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6329                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6330                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6331                         <field reporter:label="Accepting User" name="accepting_usr" />
6332                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6333                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6334                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6335                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6336                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6337                 </fields>
6338                 <links>
6339                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6340                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6341                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6342                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6343                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6344                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6345                 </links>
6346         </class>
6347         <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">
6348                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6349                         <field name="bucket" reporter:datatype="link"/>
6350                         <field name="id" reporter:datatype="id" />
6351                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6352                         <field name="create_time" reporter:datatype="timestamp" />
6353                         <field name="pos" reporter:datatype="int" />
6354                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6355                 </fields>
6356                 <links>
6357                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6358                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6359             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6360                 </links>
6361         </class>
6362         <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">
6363                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6364                         <field name="id" reporter:datatype="id" />
6365                         <field name="item" reporter:datatype="link"/>
6366                         <field name="note" reporter:datatype="text" />
6367                 </fields>
6368                 <links>
6369                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6370                 </links>
6371         </class>
6372         <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">
6373                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6374                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6375                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6376                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6377                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6378                 </fields>
6379                 <links>
6380                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6381                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6382                 </links>
6383         </class>
6384     <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">
6385         <fields oils_persist:primary="field">
6386             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6387             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6388             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6389         </fields>
6390         <links/>
6391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6392             <actions>
6393                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6394                 <retrieve />
6395                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6396                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6397             </actions>
6398         </permacrud>
6399     </class>
6400         <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">
6401                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6402                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6403                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6404                 </fields>
6405                 <links/>
6406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6407             <actions>
6408                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6409                 <retrieve/>
6410                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6411                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6412             </actions>
6413         </permacrud>
6414         </class>
6415
6416
6417         <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">
6418                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6419                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6420                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6421                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6422                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6423                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6424                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6425                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6426                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6427                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6428                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6429                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6430                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6431                 </fields>
6432                 <links>
6433                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6434                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6435                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6436                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6437                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6438                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6439                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6440                 </links>
6441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6442             <actions>
6443                 <create permission="TRANSIT_COPY">
6444                     <context link="target_copy" field="owner"/>
6445                 </create>
6446                 <retrieve/>
6447                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6448                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6449             </actions>
6450         </permacrud>
6451         </class>
6452         <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">
6453                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6454                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6455                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6456                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6457                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6458                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6459                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6460                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6461                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6462                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6463                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6464                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6465                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6466                 </fields>
6467                 <links>
6468                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6469                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6470                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6471                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6472                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6473                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6474                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6475                 </links>
6476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6477             <actions>
6478                 <create permission="TRANSIT_COPY" context_field="owner">
6479                     <context link="target_copy" field="circ_lib"/>
6480                 </create>
6481                 <retrieve/>
6482                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6483                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6484             </actions>
6485         </permacrud>
6486         </class>
6487         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6488                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6489                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6490                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6492                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6493                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6494                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6495                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6496                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6497                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6498                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6499                 </fields>
6500                 <links>
6501                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6502                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6503                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6504                 </links>
6505         </class>
6506         <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">
6507                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6508                         <field name="grp" />
6509                         <field name="id" reporter:datatype="id" />
6510                         <field name="usr" />
6511                 </fields>
6512                 <links>
6513                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6514                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6515                 </links>
6516         </class>
6517         <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">
6518                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6519                         <field name="id" reporter:datatype="id" />
6520                         <field name="fq_field" reporter:datatype="text"/>
6521                         <field name="identity_value" reporter:datatype="text"/>
6522                         <field name="translation" reporter:datatype="text"/>
6523                         <field name="string" reporter:datatype="text"/>
6524                 </fields>
6525                 <links>
6526                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6527                 </links>
6528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6529             <actions>
6530                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6531                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6532                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6533                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6534             </actions>
6535         </permacrud>
6536         </class>
6537         <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">
6538                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6539                         <field name="id" reporter:datatype="id" />
6540                         <field name="fm_class" reporter:datatype="text"/>
6541                         <field name="field" reporter:datatype="text"/>
6542                         <field name="owner" reporter:datatype="org_unit"/>
6543                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6544                 </fields>
6545                 <links>
6546                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6547                 </links>
6548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6549             <actions>
6550                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6551                 <retrieve/>
6552                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6553                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6554             </actions>
6555         </permacrud>
6556         </class>
6557         <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">
6558                 <fields oils_persist:primary="code">
6559                         <field name="code" reporter:datatype="id" />
6560                         <field name="marc_code" reporter:datatype="text"/>
6561                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6562                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6563                 </fields>
6564                 <links/>
6565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6566             <actions>
6567                 <create permission="CREATE_LOCALE" global_required="true"/>
6568                 <retrieve/>
6569                 <update permission="UPDATE_LOCALE" global_required="true"/>
6570                 <delete permission="DELETE_LOCALE" global_required="true"/>
6571             </actions>
6572         </permacrud>
6573         </class>
6574         <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">
6575                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6576                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6577                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6578                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6579             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6580                 </fields>
6581                 <links>
6582                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6583                 </links>
6584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6585             <actions>
6586                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6587                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6588                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6589                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6590             </actions>
6591         </permacrud>
6592         </class>
6593
6594         <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">
6595                 <fields oils_persist:primary="id">
6596                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6597                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6598                 </fields>
6599                 <links/>
6600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6601             <actions>
6602                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6603                 <retrieve/>
6604                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6605                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6606             </actions>
6607         </permacrud>
6608         </class>
6609
6610         <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">
6611                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6612                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6613                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6614                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6615                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6616                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6617                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6618                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6619                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6620                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6621                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6622                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6623                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6624                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6625                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6626                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6627                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6628                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6629                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6630                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6631                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6632                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6633                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6634                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6635                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6636                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6637                 </fields>
6638                 <links>
6639                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6640                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6641                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6642                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6643                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6644                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6645                 </links>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <create permission="user_request.create">
6649                     <context link="usr" field="home_ou"/>
6650                                 </create>
6651                 <retrieve permission="user_request.view">
6652                     <context link="usr" field="home_ou"/>
6653                                 </retrieve>
6654                 <update permission="user_request.update">
6655                     <context link="usr" field="home_ou"/>
6656                                 </update>
6657                 <delete permission="user_request.delete">
6658                     <context link="usr" field="home_ou"/>
6659                                 </delete>
6660             </actions>
6661         </permacrud>
6662         </class>
6663
6664         <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">
6665                 <fields oils_persist:primary="code">
6666                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6667                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6668                 </fields>
6669                 <links/>
6670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6671             <actions>
6672                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6673                 <retrieve/>
6674                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6675                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6676             </actions>
6677         </permacrud>
6678         </class>
6679
6680         <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">
6681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6682                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6683                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6684                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6685                         <field reporter:label="Ratio" name="ratio" />
6686                 </fields>
6687                 <links>
6688                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6689                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6690                 </links>
6691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6692                         <actions>
6693                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6694                                 <retrieve/>
6695                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6696                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6697                         </actions>
6698                 </permacrud>
6699         </class>
6700
6701         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6703                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6704                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6705                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6706                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6707                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6708                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6709                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6710                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6711                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6712                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6713                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6714                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6715                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6716                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6717                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6718                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6719                 </fields>
6720                 <links>
6721                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6722                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6723             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6724             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6725             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6726                 </links>
6727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6728             <actions>
6729                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6730                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6731                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6732                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6733             </actions>
6734         </permacrud>
6735         </class>
6736
6737         <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">
6738                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6739                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6740                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6741                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6742                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6743                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6744                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6745                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6746                 </fields>
6747                 <links>
6748                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6749                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6750                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6751                 </links>
6752         </class>
6753
6754         <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">
6755                 <fields oils_persist:primary="code">
6756                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6757                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6758                 </fields>
6759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6760             <actions>
6761                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6762                 <retrieve/>
6763                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6764                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6765             </actions>
6766                 </permacrud>
6767         </class>
6768
6769         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6770                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6771                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6772                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6773                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6774                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6775                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6776                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6777                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6778                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6779                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6780                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6781                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6782                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6783                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6784                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6785                 </fields>
6786                 <links>
6787                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6788                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6789                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6790                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6791                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6792                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6793                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6794                 </links>
6795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6796             <actions>
6797                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6798                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6799                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6800                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6801             </actions>
6802         </permacrud>
6803         </class>
6804
6805         <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">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6807                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6808                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6809                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6810                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6811                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6812                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6813                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6814                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6815                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6816                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6817                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6818                 </fields>
6819                 <links>
6820                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6821                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6822                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6823                 </links>
6824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6825             <actions>
6826                 <create   permission="ADMIN_INVOICE">
6827                                         <context link="invoice" field="receiver"/>
6828                                 </create>
6829                 <retrieve permission="ADMIN_INVOICE">
6830                                         <context link="invoice" field="receiver"/>
6831                                 </retrieve>
6832                 <update   permission="ADMIN_INVOICE">
6833                                         <context link="invoice" field="receiver"/>
6834                                 </update>
6835                                 <delete   permission="ADMIN_INVOICE">
6836                                         <context link="invoice" field="receiver"/>
6837                                 </delete>
6838             </actions>
6839         </permacrud>
6840         </class>
6841
6842         <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">
6843                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6844                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6845                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6846                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6847                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6848                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6849                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6850                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6851                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6852                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6853                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6854                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6855                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6856                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6857                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6858                 </fields>
6859                 <links>
6860                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6861                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6862                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6863                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6864                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6865                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6866                 </links>
6867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6868             <actions>
6869                 <create   permission="ADMIN_INVOICE">
6870                                         <context link="invoice" field="receiver"/>
6871                                 </create>
6872                 <retrieve permission="ADMIN_INVOICE">
6873                                         <context link="invoice" field="receiver"/>
6874                                 </retrieve>
6875                 <update   permission="ADMIN_INVOICE">
6876                                         <context link="invoice" field="receiver"/>
6877                                 </update>
6878                                 <delete   permission="ADMIN_INVOICE">
6879                                         <context link="invoice" field="receiver"/>
6880                                 </delete>
6881             </actions>
6882         </permacrud>
6883         </class>
6884
6885         <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">
6886                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6887                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6888                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6889                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6890                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6891                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6892                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6893                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6894                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6895                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6896                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6897                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6898                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6899                 </fields>
6900                 <links>
6901                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6902                 </links>
6903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6904             <actions>
6905                 <create permission="ADMIN_PROVIDER">
6906                     <context link="provider" field="owner"/>
6907                 </create>
6908                 <retrieve permission="ADMIN_PROVIDER">
6909                     <context link="provider" field="owner"/>
6910                 </retrieve>
6911                 <update permission="ADMIN_PROVIDER">
6912                     <context link="provider" field="owner"/>
6913                 </update>
6914                 <delete permission="ADMIN_PROVIDER">
6915                     <context link="provider" field="owner"/>
6916                 </delete>
6917             </actions>
6918         </permacrud>
6919         </class>
6920
6921         <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">
6922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6923                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6924                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6925                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6926                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6927                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6928                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6929         </fields>
6930                 <links>
6931                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6932                 </links>
6933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6934             <actions>
6935                 <create permission="ADMIN_PROVIDER">
6936                     <context link="provider" field="owner"/>
6937                 </create>
6938                 <retrieve permission="ADMIN_PROVIDER">
6939                     <context link="provider" field="owner"/>
6940                 </retrieve>
6941                 <update permission="ADMIN_PROVIDER">
6942                     <context link="provider" field="owner"/>
6943                 </update>
6944                 <delete permission="ADMIN_PROVIDER">
6945                     <context link="provider" field="owner"/>
6946                 </delete>
6947             </actions>
6948         </permacrud>
6949     </class>
6950         <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">
6951                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6952                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6953                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6954                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6955                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6956                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6957                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6958                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6959                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6960                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6961                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6962                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6963                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6964                 </fields>
6965                 <links>
6966                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6967                 </links>
6968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6969             <actions>
6970                 <create permission="ADMIN_PROVIDER">
6971                     <context link="contact" jump='provider' field="owner"/>
6972                 </create>
6973                 <retrieve permission="ADMIN_PROVIDER">
6974                     <context link="contact" jump='provider' field="owner"/>
6975                 </retrieve>
6976                 <update permission="ADMIN_PROVIDER">
6977                     <context link="contact" jump='provider' field="owner"/>
6978                 </update>
6979                 <delete permission="ADMIN_PROVIDER">
6980                     <context link="contact" jump='provider' field="owner"/>
6981                 </delete>
6982             </actions>
6983         </permacrud>
6984         </class>
6985
6986         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6987                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6988                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6989                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6990                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6991                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6992                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6993                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6994                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6995                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6996                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6997                 </fields>
6998                 <links>
6999                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7000                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7001                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7002                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7003                 </links>
7004         </class>
7005
7006         <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">
7007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7008                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7009                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7010                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7011                 </fields>
7012                 <links>
7013             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7014                 </links>
7015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7016                         <actions>
7017                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7018                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7019                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7020                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7021                         </actions>
7022                 </permacrud>
7023         </class>
7024
7025         <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">
7026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7027                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7028                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7029                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7030                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7031                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7032                 </fields>
7033                 <links>
7034                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7035                 </links>
7036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7037                         <actions>
7038                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7039                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7040                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7041                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7042                         </actions>
7043                 </permacrud>
7044         </class>
7045
7046         <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">
7047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7048                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7049                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7050                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7051                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7052                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7053                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7054                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7055                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7056                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7057                 </fields>
7058                 <links>
7059                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7060                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7061             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7062             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7063                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7064                 </links>
7065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7066             <actions>
7067                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7068                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7069                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7070                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7071             </actions>
7072         </permacrud>
7073         </class>
7074
7075         <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">
7076                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7077                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7078                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7079                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7080                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7081                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7082                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7083                 </fields>
7084                 <links>
7085                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7086                 </links>
7087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7088                         <actions>
7089                                 <create permission="ADMIN_FUNDING_SOURCE">
7090                     <context link="funding_source" field="owner"/>
7091                 </create>
7092                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7093                     <context link="funding_source" field="owner"/>
7094                 </retrieve>
7095                                 <update permission="ADMIN_FUNDING_SOURCE">
7096                     <context link="funding_source" field="owner"/>
7097                 </update>
7098                                 <delete permission="ADMIN_FUNDING_SOURCE">
7099                     <context link="funding_source" field="owner"/>
7100                 </delete>
7101                         </actions>
7102                 </permacrud>
7103         </class>
7104
7105         <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">
7106                 <fields oils_persist:primary="id">
7107                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7108                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7109                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7110                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7111                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7112                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7113                 </fields>
7114                 <links>
7115                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7116                 </links>
7117         </class>
7118
7119         <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">
7120                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7121                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7122                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7123                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7124                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7125                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7126                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7127                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7128                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7129                 </fields>
7130                 <links>
7131                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7132                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7133                 </links>
7134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7135                         <actions>
7136                                 <create permission="ADMIN_ACQ_FUND">
7137                     <context link="fund" field="org"/>
7138                 </create>
7139                                 <retrieve permission="ADMIN_ACQ_FUND">
7140                     <context link="fund" field="org"/>
7141                 </retrieve>
7142                                 <update permission="ADMIN_ACQ_FUND">
7143                     <context link="fund" field="org"/>
7144                 </update>
7145                                 <delete permission="ADMIN_ACQ_FUND">
7146                     <context link="fund" field="org"/>
7147                 </delete>
7148                         </actions>
7149                 </permacrud>
7150         </class>
7151
7152         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7153                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7154                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7155                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7156                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7157                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7158                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7159                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7160                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7161                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7162                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7163                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7164                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7165                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7166                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7167                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7168                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7169                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7170                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7171                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7172                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7173                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7174                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7175                 </fields>
7176                 <links>
7177                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7178                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7179             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7180             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7181             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7182             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7183             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7184             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7185             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7186             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7187             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7188                 </links>
7189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7190             <actions>
7191                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7192                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7193                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7194                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7195             </actions>
7196         </permacrud>
7197         </class>
7198
7199         <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">
7200                 <fields oils_persist:primary="fund">
7201                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7202                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7203                 </fields>
7204                 <links>
7205                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7206                 </links>
7207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7208             <actions>
7209                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7210                                         <context link="fund" field="org" />
7211                 </retrieve>
7212             </actions>
7213         </permacrud>
7214         </class>
7215
7216         <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">
7217                 <fields oils_persist:primary="fund">
7218                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7219                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7220                 </fields>
7221                 <links>
7222                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7223                 </links>
7224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7225             <actions>
7226                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7227                                         <context link="fund" field="org" />
7228                 </retrieve>
7229             </actions>
7230         </permacrud>
7231         </class>
7232
7233         <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">
7234                 <fields oils_persist:primary="fund">
7235                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7236                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7237                 </fields>
7238                 <links>
7239                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7240                 </links>
7241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7242             <actions>
7243                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7244                                         <context link="fund" field="org" />
7245                 </retrieve>
7246             </actions>
7247         </permacrud>
7248         </class>
7249
7250         <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">
7251                 <fields oils_persist:primary="fund">
7252                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7253                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7254                 </fields>
7255                 <links>
7256                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7257                 </links>
7258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7259             <actions>
7260                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7261                                         <context link="fund" field="org" />
7262                 </retrieve>
7263             </actions>
7264         </permacrud>
7265         </class>
7266
7267         <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">
7268                 <fields oils_persist:primary="fund">
7269                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7270                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7271                 </fields>
7272                 <links>
7273                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7274                 </links>
7275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7276             <actions>
7277                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7278                                         <context link="fund" field="org" />
7279                 </retrieve>
7280             </actions>
7281         </permacrud>
7282         </class>
7283
7284    <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">
7285         <fields oils_persist:primary="fund">
7286             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7287             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7288         </fields>
7289         <links>
7290             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7291         </links>
7292     </class>
7293
7294    <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">
7295         <fields oils_persist:primary="fund">
7296             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7297             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7298         </fields>
7299         <links>
7300             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7301         </links>
7302     </class>
7303
7304    <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">
7305         <fields oils_persist:primary="fund">
7306             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7307             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7308         </fields>
7309         <links>
7310             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7311         </links>
7312     </class>
7313
7314    <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">
7315         <fields oils_persist:primary="fund">
7316             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7317             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7318         </fields>
7319         <links>
7320             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7321         </links>
7322     </class>
7323
7324    <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">
7325         <fields oils_persist:primary="fund">
7326             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7327             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7328         </fields>
7329         <links>
7330             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7331         </links>
7332     </class>
7333
7334         <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">
7335                 <fields oils_persist:primary="funding_source">
7336                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7337                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7338                 </fields>
7339                 <links>
7340                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7341                 </links>
7342         </class>
7343
7344         <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">
7345                 <fields oils_persist:primary="funding_source">
7346                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7347                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7348                 </fields>
7349                 <links>
7350                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7351                 </links>
7352         </class>
7353
7354         <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">
7355                 <fields oils_persist:primary="funding_source">
7356                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7357                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7358                 </fields>
7359                 <links>
7360                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7361                 </links>
7362         </class>
7363
7364         <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">
7365                 <fields oils_persist:primary="fund">
7366                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7367                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7368                 </fields>
7369                 <links>
7370                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7371                 </links>
7372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7373             <actions>
7374                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7375                                         <context link="fund" field="org" />
7376                 </retrieve>
7377             </actions>
7378         </permacrud>
7379     </class>
7380     <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">
7381         <oils_persist:source_definition><![CDATA[
7382             SELECT
7383                 acqf.*,
7384                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7385                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7386                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7387                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7388             FROM
7389                 acq.fund acqf
7390                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7391                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7392                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7393                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7394         ]]></oils_persist:source_definition>
7395         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7396             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7397             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7398             <field reporter:label="Name" name="name" reporter:datatype="text" />
7399             <field reporter:label="Year" name="year" reporter:datatype="int" />
7400             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7401             <field reporter:label="Code" name="code" reporter:datatype="text" />
7402             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7403             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7404             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7405             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7406             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7407
7408             <!-- non fund-native fields -->
7409             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7410             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7411             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7412             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7413         </fields>
7414         <links>
7415             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7416             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7417             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7418         </links>
7419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7420             <actions>
7421                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7422             </actions>
7423         </permacrud>
7424         </class>
7425         <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">
7426                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7427                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7428                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7429                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7430                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7431                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7432                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7433                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7434                 </fields>
7435                 <links>
7436                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7437                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7438                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7439                 </links>
7440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441                         <actions>
7442                                 <create permission="ADMIN_ACQ_FUND">
7443                     <context link="fund" field="org"/>
7444                 </create>
7445                                 <retrieve permission="ADMIN_ACQ_FUND">
7446                     <context link="fund" field="org"/>
7447                 </retrieve>
7448                                 <update permission="ADMIN_ACQ_FUND">
7449                     <context link="fund" field="org"/>
7450                 </update>
7451                                 <delete permission="ADMIN_ACQ_FUND">
7452                     <context link="fund" field="org"/>
7453                 </delete>
7454                         </actions>
7455                 </permacrud>
7456         </class>
7457
7458     <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">
7459         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7460             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7461             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7462             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7463             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7464             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7465             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7466             <field reporter:label="Note" name="note" reporter:datatype="text" />
7467             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7468         </fields>
7469         <links>
7470             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7471             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7472             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7473         </links>
7474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7475                         <actions>
7476                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7477                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7478                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7479                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7480                         </actions>
7481                 </permacrud>
7482     </class>
7483
7484         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7485                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7486                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7487                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7488                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7489                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7490                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7491                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7492                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7493                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7494                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7495                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7496                 </fields>
7497                 <links>
7498                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7500                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7501                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7502                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7503                 </links>
7504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7505                         <actions>
7506                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7507                         </actions>
7508                 </permacrud>
7509         </class>
7510
7511         <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">
7512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7513                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7514                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7515                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7516                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7517                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7518                 </fields>
7519                 <links>
7520                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7521                 </links>
7522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7523                         <actions>
7524                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7525                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7526                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7527                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7528                         </actions>
7529                 </permacrud>
7530         </class>
7531
7532         <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">
7533                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7534                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7535                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7536                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7537                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7538                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7539                         <field reporter:label="State" name="state" reporter:datatype="text" />
7540                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7541                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7542                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7543                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7544                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7545                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7546                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7547                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7548                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7549                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7550                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7551                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7552                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7553                 </fields>
7554                 <links>
7555                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7556                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7557                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7558                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7559                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7560                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7561                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7562                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7563                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7564                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7565                 </links>
7566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7567                         <actions>
7568                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7569                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7570                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7571                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7572                         </actions>
7573                 </permacrud>
7574         </class>
7575
7576         <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">
7577                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7578                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7579                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7580                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7581                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7582                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7583                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7584                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7585                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7586                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7587                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7588                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7589                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7590                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7591                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7592                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7593                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7594                 </fields>
7595                 <links>
7596                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7597                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7598                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7599                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7600                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7601                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7602                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7603                 </links>
7604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7605             <actions>
7606                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7607             </actions>
7608                 </permacrud>
7609         </class>
7610
7611         <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">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7613                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7614                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7615                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7616                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7617                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7618                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7619                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7620                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7621                 </fields>
7622                 <links>
7623                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7624                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7625                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7626                 </links>
7627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7628             <actions>
7629                 <create permission="CREATE_PURCHASE_ORDER">
7630                     <context link="purchase_order" field="ordering_agency"/>
7631                 </create>
7632                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7633                     <context link="purchase_order" field="ordering_agency"/>
7634                 </retrieve>
7635                 <update permission="CREATE_PURCHASE_ORDER">
7636                     <context link="purchase_order" field="ordering_agency"/>
7637                 </update>
7638                 <delete permission="CREATE_PURCHASE_ORDER">
7639                     <context link="purchase_order" field="ordering_agency"/>
7640                 </delete>
7641             </actions>
7642                 </permacrud>
7643         </class>
7644
7645         <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">
7646                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7647                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7648                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7649                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7650                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7651                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7652                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7653                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7654                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7655                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7656                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7657                 </fields>
7658                 <links>
7659                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7660                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7661                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7662                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7663                 </links>
7664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7665             <actions>
7666                 <create permission="CREATE_PURCHASE_ORDER">
7667                     <context link="purchase_order" field="ordering_agency"/>
7668                 </create>
7669                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7670                     <context link="purchase_order" field="ordering_agency"/>
7671                 </retrieve>
7672                 <update permission="CREATE_PURCHASE_ORDER">
7673                     <context link="purchase_order" field="ordering_agency"/>
7674                 </update>
7675                 <delete permission="CREATE_PURCHASE_ORDER">
7676                     <context link="purchase_order" field="ordering_agency"/>
7677                 </delete>
7678             </actions>
7679                 </permacrud>
7680         </class>
7681
7682         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7684                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7685                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7686                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7687                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7688                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7689                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7690                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7691                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7692                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7693                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7694                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7695                         <field reporter:label="State" name="state" reporter:datatype="text" />
7696                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7697                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7698                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7699                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7700                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7701                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7702                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7703                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7704                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7705                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7706                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7707                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7708                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7709                 </fields>
7710                 <links>
7711                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7712                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7713                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7714                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7715                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7716                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7717                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7718                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7719                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7720                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7721                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7722                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7723                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7724                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7725                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7726                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7727                 </links>
7728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7729                         <actions>
7730                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7731                                         <context link="purchase_order" field="ordering_agency"/>
7732                                         <context link="picklist" field="org_unit"/>
7733                                 </retrieve>
7734                         </actions>
7735                 </permacrud>
7736         </class>
7737
7738         <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">
7739                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7740                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7741                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7742                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7743                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7744                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7745                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7746                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7747                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7748                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7749                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7750                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7751                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7752                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7753                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7754                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7755                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7756                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7757                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7758                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7759                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7760                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7761                 </fields>
7762                 <links>
7763                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7764                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7765                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7766                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7767                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7768                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7769                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7770                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7771                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7772                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7773                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7774                 </links>
7775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7776                         <actions>
7777                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7778                                         <context link="purchase_order" field="ordering_agency"/>
7779                                         <context link="picklist" field="org_unit"/>
7780                                 </retrieve>
7781                         </actions>
7782                 </permacrud>
7783         </class>
7784
7785         <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">
7786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7787                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7788                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7789                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7790                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7791                 </fields>
7792                 <links>
7793                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7794                 </links>
7795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796                         <actions>
7797                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7798                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7799                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7800                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7801                         </actions>
7802                 </permacrud>
7803         </class>
7804
7805         <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">
7806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7807                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7808                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7809                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7810                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7811                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7812                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7813                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7814                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7815                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7816                 </fields>
7817                 <links>
7818                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7819                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7820                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7821                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7822                 </links>
7823         </class>
7824
7825         <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">
7826                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7827                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7828                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7829                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7830                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7831                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7832                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7833                 </fields>
7834                 <links>
7835                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7836                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7837                 </links>
7838         </class>
7839
7840         <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">
7841                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7842                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7843                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7844                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7845                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7846                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7847                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7848                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7849                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7850                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7851                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7852                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7853                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7854                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7855                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7856                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7857                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7858                 </fields>
7859                 <links>
7860                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7861                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7862                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7863                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7864                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7865                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7866                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7867                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7868                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7869                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7870                 </links>
7871         </class>
7872
7873         <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">
7874                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7875                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7876                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7877                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7878                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7879                 </fields>
7880                 <links/>
7881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7882                         <actions>
7883                                 <retrieve />
7884                         </actions>
7885                 </permacrud>
7886         </class>
7887
7888         <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">
7889                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7890                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7891                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7892                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7893                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7894                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7895             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7896                 </fields>
7897                 <links/>
7898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7899             <actions>
7900                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7901                 <retrieve />
7902                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7903                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7904             </actions>
7905         </permacrud>
7906         </class>
7907
7908         <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">
7909                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7910                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7911                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7912                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7913                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7914                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7915                 </fields>
7916                 <links/>
7917         </class>
7918         <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">
7919                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7920                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7921                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7922                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7923                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7924                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7925                 </fields>
7926                 <links>
7927                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7928                 </links>
7929         </class>
7930
7931         <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">
7932             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7933                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7934                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7935                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7936                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7937                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7938                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7939         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7940
7941             </fields>
7942             <links>
7943                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7944             </links>
7945             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7946                 <actions>
7947                     <create permission="ADMIN_PROVIDER">
7948                         <context link="provider" field="owner"/>
7949                     </create>
7950                     <retrieve permission="ADMIN_PROVIDER">
7951                         <context link="provider" field="owner"/>
7952                     </retrieve>
7953                     <update permission="ADMIN_PROVIDER">
7954                         <context link="provider" field="owner"/>
7955                     </update>
7956                     <delete permission="ADMIN_PROVIDER">
7957                         <context link="provider" field="owner"/>
7958                     </delete>
7959                 </actions>
7960             </permacrud>
7961         </class>
7962         
7963         <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">
7964             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7965                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7966                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7967                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7968                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7969             </fields>
7970             <links>
7971                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7972             </links>
7973             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7974                 <actions>
7975                     <create permission="ADMIN_PROVIDER">
7976                         <context link="provider" field="owner"/>
7977                     </create>
7978                     <retrieve permission="ADMIN_PROVIDER">
7979                         <context link="provider" field="owner"/>
7980                     </retrieve>
7981                     <update permission="ADMIN_PROVIDER">
7982                         <context link="provider" field="owner"/>
7983                     </update>
7984                     <delete permission="ADMIN_PROVIDER">
7985                         <context link="provider" field="owner"/>
7986                     </delete>
7987                 </actions>
7988             </permacrud>
7989         </class>
7990         
7991         <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">
7992             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7993                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7994                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7995                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7996                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7997                 </fields>
7998                 <links/>
7999         </class>
8000
8001         <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">
8002                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8003                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8004                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8005                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8006                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8007                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8008                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8009                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8010                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8011                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8012                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8013                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8014                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8015                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8016                 </fields>
8017                 <links>
8018                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8019                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8020                 </links>
8021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8022             <actions>
8023                 <create permission="ADMIN_PROVIDER">
8024                     <context link="provider" field="owner"/>
8025                 </create>
8026                 <retrieve permission="ADMIN_PROVIDER">
8027                     <context link="provider" field="owner"/>
8028                 </retrieve>
8029                 <update permission="ADMIN_PROVIDER">
8030                     <context link="provider" field="owner"/>
8031                 </update>
8032                 <delete permission="ADMIN_PROVIDER">
8033                     <context link="provider" field="owner"/>
8034                 </delete>
8035             </actions>
8036         </permacrud>
8037         </class>
8038
8039         <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">
8040                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8041                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8042                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8043                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8044                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8045                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8046                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8047                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8048                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8049                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8050                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8051                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8052                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8053                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8054                 </fields>
8055                 <links>
8056                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8057                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8058                 </links>
8059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8060             <actions>
8061                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8062                     <context link="account" jump="provider" field="owner"/>
8063                 </retrieve>
8064                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8065                     <context link="account" jump="provider" field="owner"/>
8066                 </update>
8067                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8068                     <context link="account" jump="provider" field="owner"/>
8069                 </delete>
8070             </actions>
8071         </permacrud>
8072         </class>
8073
8074
8075         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8076                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8077                         <field name="id" reporter:datatype="id" />
8078                         <field name="parent" reporter:datatype="link"/>
8079                         <field name="owner" reporter:datatype="link"/>
8080                         <field name="create_time" reporter:datatype="timestamp"/>
8081                         <field name="name" reporter:datatype="text"/>
8082                         <field name="shared" reporter:datatype="bool"/>
8083                         <field name="share_with" reporter:datatype="link"/>
8084                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8085                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8086                 </fields>
8087                 <links>
8088                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8089                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8090                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8091                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8092                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8093                 </links>
8094         </class>
8095         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8096                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8097                         <field name="id" reporter:datatype="id" />
8098                         <field name="parent" reporter:datatype="link"/>
8099                         <field name="owner" reporter:datatype="link"/>
8100                         <field name="create_time" reporter:datatype="timestamp"/>
8101                         <field name="name" reporter:datatype="text"/>
8102                         <field name="shared" reporter:datatype="bool"/>
8103                         <field name="share_with" reporter:datatype="link"/>
8104                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8105                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8106                 </fields>
8107                 <links>
8108                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8109                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8110                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8111                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8112                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8113                 </links>
8114         </class>
8115         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8116                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8117                         <field name="id" reporter:datatype="id" />
8118                         <field name="parent" reporter:datatype="link"/>
8119                         <field name="owner" reporter:datatype="link"/>
8120                         <field name="create_time" reporter:datatype="timestamp"/>
8121                         <field name="name" reporter:datatype="text"/>
8122                         <field name="shared" reporter:datatype="bool"/>
8123                         <field name="share_with" reporter:datatype="link"/>
8124                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8125                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8126                 </fields>
8127                 <links>
8128                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8129                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8130                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8131                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8132                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8133                 </links>
8134         </class>
8135         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8136                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8137                         <field name="id" reporter:datatype="id" />
8138                         <field name="owner" reporter:datatype="link"/>
8139                         <field name="create_time" reporter:datatype="timestamp"/>
8140                         <field name="name" reporter:datatype="text"/>
8141                         <field name="data" reporter:datatype="text"/>
8142                         <field name="folder" reporter:datatype="link"/>
8143                         <field name="description" reporter:datatype="text"/>
8144                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8145                 </fields>
8146                 <links>
8147                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8148                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8149                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8150                 </links>
8151         </class>
8152         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8153                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8154                         <field name="id" reporter:datatype="id" />
8155                         <field name="owner" reporter:datatype="link"/>
8156                         <field name="create_time" reporter:datatype="timestamp"/>
8157                         <field name="template" reporter:datatype="link"/>
8158                         <field name="data" reporter:datatype="text"/>
8159                         <field name="folder" reporter:datatype="link"/>
8160                         <field name="recur" reporter:datatype="bool"/>
8161                         <field name="recurrence" reporter:datatype="interval"/>
8162                         <field name="name" reporter:datatype="text"/>
8163                         <field name="description" reporter:datatype="text"/>
8164                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8165                 </fields>
8166                 <links>
8167                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8168                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8169                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8170                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8171                 </links>
8172         </class>
8173         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8174                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8175                         <field name="id" reporter:datatype="id" />
8176                         <field name="runner" reporter:datatype="link"/>
8177                         <field name="start_time" reporter:datatype="timestamp"/>
8178                         <field name="complete_time" reporter:datatype="timestamp"/>
8179                         <field name="run_time" reporter:datatype="timestamp"/>
8180                         <field name="email" reporter:datatype="text"/>
8181                         <field name="excel_format" reporter:datatype="bool"/>
8182                         <field name="csv_format" reporter:datatype="bool"/>
8183                         <field name="html_format" reporter:datatype="bool"/>
8184                         <field name="error_code" reporter:datatype="int"/>
8185                         <field name="error_text" reporter:datatype="text"/>
8186                         <field name="report" reporter:datatype="link"/>
8187                         <field name="folder" reporter:datatype="link"/>
8188                         <field name="chart_pie" reporter:datatype="bool"/>
8189                         <field name="chart_bar" reporter:datatype="bool"/>
8190                         <field name="chart_line" reporter:datatype="bool"/>
8191                 </fields>
8192                 <links>
8193                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8194                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8195                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8196                 </links>
8197         </class>
8198         <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">
8199                 <fields oils_persist:primary="id">
8200                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8201                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8202                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8203                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8204                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8205                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8206                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8207                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8208                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8209                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8210                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8211                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8212                 </fields>
8213                 <links>
8214                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8215                 </links>
8216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8217                         <actions>
8218                                 <retrieve />
8219                         </actions>
8220                 </permacrud>
8221         </class>
8222         <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">
8223                 <fields oils_persist:primary="id">
8224                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8225                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8226                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8227                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8228                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8229                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8230                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8231                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8232                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8233                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8234                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8235                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8236                 </fields>
8237                 <links>
8238                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8239                 </links>
8240         </class>
8241         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8242                 <fields oils_persist:primary="id">
8243                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8244                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8245                         <field reporter:label="Fingerprint" name="fingerprint" />
8246                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8247                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8248                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8249                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8250                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8251                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8252                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8253                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8254                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8255                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8256                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8257                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8258                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8259                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8260                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8261                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8262                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8263                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8264                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8265                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8266                 </fields>
8267                 <links>
8268                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8269                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8270                 </links>
8271         </class>
8272         <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">
8273                 <fields oils_persist:primary="id">
8274                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8275                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8276                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8277                 </fields>
8278                 <links>
8279                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8280                 </links>
8281         </class>
8282         <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">
8283                 <fields oils_persist:primary="id">
8284                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8285                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8286                 </fields>
8287                 <links>
8288                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8289                 </links>
8290         </class>
8291         <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">
8292                 <fields oils_persist:primary="id">
8293                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8294                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8295                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8296                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8297                 </fields>
8298                 <links>
8299                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8300                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8301                 </links>
8302         </class>
8303         <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">
8304                 <fields oils_persist:primary="xact">
8305                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8306                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8307                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8308                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8309                 </fields>
8310                 <links>
8311                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8312                 </links>
8313         </class>
8314         <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">
8315                 <fields oils_persist:primary="xact">
8316                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8317                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8318                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8319                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8320                 </fields>
8321                 <links>
8322                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8323                 </links>
8324         </class>
8325         <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)">
8326                 <fields oils_persist:primary="id">
8327                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8328                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8329                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8330                 </fields>
8331                 <links>
8332                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8333                 </links>
8334         </class>
8335         <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">
8336                 <fields oils_persist:primary="id">
8337                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8338                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8339                 </fields>
8340                 <links>
8341                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8342                 </links>
8343         </class>
8344         <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">
8345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8346                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8347                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8348                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8349                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8350                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8351                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8352                 </fields>
8353                 <links>
8354                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8355                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8356                 </links>
8357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8358                         <actions>
8359                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8360                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8361                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8362                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8363                         </actions>
8364                 </permacrud>
8365         </class>
8366         <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">
8367                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8368                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8369                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8370                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8371                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8372                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8373                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8374                 </fields>
8375                 <links>
8376                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8377                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8378                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8379                 </links>
8380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8381                         <actions>
8382                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8383                                         <context link="formula" field="owner"/>
8384                                 </create>
8385                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8386                                         <context link="formula" field="owner"/>
8387                                 </retrieve>
8388                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8389                                         <context link="formula" field="owner"/>
8390                                 </update>
8391                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8392                                         <context link="formula" field="owner"/>
8393                                 </delete>
8394                         </actions>
8395                 </permacrud>
8396         </class>
8397
8398         <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">
8399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8400                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8401                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8402                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8403                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8404                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8405                 </fields>
8406                 <links>
8407                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8408                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8409                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8410                 </links>
8411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8412                         <actions>
8413                                 <create permission="CREATE_PURCHASE_ORDER">
8414                                         <context link="formula" field="owner"/>
8415                 </create>
8416                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8417                                         <context link="formula" field="owner"/>
8418                 </retrieve>
8419                                 <update permission="CREATE_PURCHASE_ORDER">
8420                                         <context link="formula" field="owner"/>
8421                 </update>
8422                                 <delete permission="CREATE_PURCHASE_ORDER">
8423                                         <context link="formula" field="owner"/>
8424                 </delete>
8425                         </actions>
8426                 </permacrud>
8427         </class>
8428
8429         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8430                 <fields oils_persist:primary="id">
8431                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8432                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8433                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8434                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8435                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8436                 </fields>
8437                 <links>
8438                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8439                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8440                 </links>
8441         </class>
8442
8443         <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">
8444                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8445                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8446                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8447                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8448                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8449                 </fields>
8450                 <links>
8451                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8452                 </links>
8453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8454                         <actions>
8455                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8456                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8457                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8458                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8459                         </actions>
8460                 </permacrud>
8461         </class>
8462
8463         <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">
8464                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8465                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8466                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8467                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8468                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8469                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8470                 </fields>
8471                 <links>
8472                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8473                 </links>
8474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8475                         <actions>
8476                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8477                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8478                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8479                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8480                         </actions>
8481                 </permacrud>
8482         </class>
8483
8484         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8486                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8487                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8488                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8489                 </fields>
8490                 <links>
8491                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8492                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8493                 </links>
8494         </class>
8495
8496         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8497                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8498                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8499                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8500                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8501                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8502                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8503                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8504                 </fields>
8505                 <links>
8506                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8507                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8508                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8509                 </links>
8510         </class>
8511
8512         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8513                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8514                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8515                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8516                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8517                 </fields>
8518                 <links>
8519                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8520                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8521                 </links>
8522         </class>
8523
8524         <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">
8525                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8526                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8527                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8528                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8529                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8530                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8531                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8532                 </fields>
8533                 <links>
8534                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8535                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8536                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8537                 </links>
8538         </class>
8539
8540         <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">
8541                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8542                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8543                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8544                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8545                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8546                 </fields>
8547                 <links>
8548                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8549                 </links>
8550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8551             <actions>
8552                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8553                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8554                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8555                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8556             </actions>
8557                 </permacrud>
8558         </class>
8559
8560         <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">
8561                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8562                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8563                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8564                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8565                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8566                 </fields>
8567                 <links>
8568                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8569                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8570                 </links>
8571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8572                         <actions>
8573                                 <create permission="ADMIN_CLAIM_POLICY">
8574                                         <context link="claim_policy" field="org_unit"/>
8575                 </create>
8576                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8577                                         <context link="claim_policy" field="org_unit"/>
8578                 </retrieve>
8579                                 <update permission="ADMIN_CLAIM_POLICY">
8580                                         <context link="claim_policy" field="org_unit"/>
8581                 </update>
8582                                 <delete permission="ADMIN_CLAIM_POLICY">
8583                                         <context link="claim_policy" field="org_unit"/>
8584                 </delete>
8585                         </actions>
8586                 </permacrud>
8587         </class>
8588
8589     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8590         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8591             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8592             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8593             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8594             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8595             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8596             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8597             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8598             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8599             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8600             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8601             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8602             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8603             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8604             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8605             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8606         </fields>
8607     </class>
8608
8609     <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">
8610         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8611             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8612             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8613             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8614             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8615             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8616         </fields>
8617     </class>
8618
8619     <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">
8620         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8621             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8622             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8623             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8624             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8625             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8626             <field reporter:label="City" name="city" reporter:datatype="text"/>
8627             <field reporter:label="State" name="state" reporter:datatype="text"/>
8628             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8629             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8630             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8631         </fields>
8632     </class>
8633
8634     <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">
8635         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8636             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8637             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8638             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8639             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8640             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8641             <field reporter:label="City" name="city" reporter:datatype="text"/>
8642             <field reporter:label="State" name="state" reporter:datatype="text"/>
8643             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8644             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8645             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8646         </fields>
8647     </class>
8648
8649     <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">
8650         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8651             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8652             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8653             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8654             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8655             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8656             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8657         </fields>
8658     </class>
8659
8660         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8661                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8662                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8663                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8664                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8665                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8666                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8667                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8668                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8669                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8670                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8671                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8672                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8673                 </fields>
8674                 <links>
8675                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8676                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8677                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8678                 </links>
8679         </class>
8680
8681         <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">
8682                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8683                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8684                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8685                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8686                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8687                 </fields>
8688                 <links>
8689                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8690                 </links>
8691         </class>
8692
8693     <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">
8694         <fields>
8695             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8696             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8697             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8698         </fields>
8699                 <links>
8700                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8701                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8702                 </links>
8703     </class>
8704
8705     <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">
8706         <fields>
8707             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8708             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8709         </fields>
8710                 <links>
8711                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8712                 </links>
8713     </class>
8714
8715     <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">
8716         <fields>
8717             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8718             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8719             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8720         </fields>
8721                 <links>
8722                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8723                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8724                 </links>
8725     </class>
8726
8727     <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">
8728         <fields>
8729             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8730             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8731         </fields>
8732                 <links>
8733                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8734                 </links>
8735     </class>
8736
8737     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8738                 <oils_persist:source_definition>
8739
8740             SELECT  DISTINCT l.*
8741               FROM  action.unfulfilled_hold_loops l
8742                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8743               WHERE l.count = m.max
8744
8745                 </oils_persist:source_definition>
8746         <fields>
8747             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8748             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8749             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8750         </fields>
8751                 <links>
8752                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8753                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8754                 </links>
8755     </class>
8756
8757         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8758                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8759                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8760                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8761                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8762                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8763                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8764                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8765                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8766                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8767                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8768                 </fields>
8769                 <links>
8770                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8771                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8772                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8773                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8774                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8775                 </links>
8776         </class>
8777
8778         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8779                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8780                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8781                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8782                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8783                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8784                 </fields>
8785                 <links>
8786                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8787                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8788                 </links>
8789         </class>
8790
8791         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8792                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8793                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8794                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8795                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8796                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8797                 </fields>
8798                 <links>
8799                 </links>
8800         </class>
8801
8802         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8803                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8804                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8805                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8806                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8807                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8808                 </fields>
8809                 <links>
8810                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8811                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8812                 </links>
8813         </class>
8814         
8815         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8816                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8817                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8818                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8819                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8820                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8821                 </fields>
8822                 <links>
8823                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8824                 </links>
8825         </class>
8826         
8827         <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">
8828                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8829                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8830                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8831                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8832                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8833                 </fields>
8834                 <links>
8835                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8836                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8837                 </links>
8838         </class>
8839
8840         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8841                 <fields oils_persist:primary="name">
8842                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8843                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8844                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8845                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8846                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8847                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8848                 </fields>
8849                 <links>
8850                 </links>
8851         </class>
8852
8853         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8854                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8855                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8856                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8857                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8858                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8859                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8860                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8861                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8862                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8863                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8864                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8865                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8866                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8867                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8868                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8869                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8870                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8871                 </fields>
8872                 <links>
8873                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8874                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8875                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8876                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8877                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8878                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8879                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8880                 </links>
8881         </class>
8882
8883         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8884                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8885                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8886                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8887                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8888                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8889                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8890                 </fields>
8891                 <links>
8892                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8893                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8894                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8895                 </links>
8896         </class>
8897
8898         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8899                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8900                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8901                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8902                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8903                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8904                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8905                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8906                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8907                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8909                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8910                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8911                 </fields>
8912                 <links>
8913                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8914                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8915                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8916                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8917                 </links>
8918         </class>
8919
8920         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8921                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8922                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8923                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8924                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8925                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8926                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8927                 </fields>
8928                 <links>
8929                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8930                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8931                 </links>
8932         </class>
8933
8934         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8935                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8936                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8937                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8938                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8939                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8940                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8941                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8942                 </fields>
8943                 <links>
8944                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8945                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8946                 </links>
8947         </class>
8948
8949         <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">
8950                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8951                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8952                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8953                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8954                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8955                 </fields>
8956                 <links>
8957                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8958                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8959                 </links>
8960         </class>
8961
8962         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8963                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8964                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8965                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8966                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8967                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8968                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8969                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8970                 </fields>
8971                 <links>
8972                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8973                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8974                 </links>
8975         </class>
8976
8977         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8978                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8979                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8980                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8981                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8982                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8983                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8984                 </fields>
8985                 <links>
8986                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8987                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8988                 </links>
8989         </class>
8990
8991         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8992                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8993                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8994                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8995                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8996                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8997                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8998                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8999                 </fields>
9000                 <links>
9001                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9002                 </links>
9003         </class>
9004
9005         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9006                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9007                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9008                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9009                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9010                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9011                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9012                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9013                 </fields>
9014                 <links>
9015                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9016                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9017                 </links>
9018         </class>
9019
9020         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9021                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9022                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9023                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9024                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9025                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9026                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9027                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9028                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9029                 </fields>
9030                 <links>
9031                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9032                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9033                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9034                 </links>
9035         </class>
9036
9037         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9038                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9039                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9040                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9041                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9042                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9043                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9044                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9045                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9046                 </fields>
9047                 <links>
9048                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9049                 </links>
9050         </class>
9051
9052         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9053                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9054                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9055                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9056                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9057                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9058                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9059                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9060                 </fields>
9061                 <links>
9062                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9063                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9064                 </links>
9065         </class>
9066
9067         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9068                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9069                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9070                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9071                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9072                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9073                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9074                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9075                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9076                 </fields>
9077                 <links>
9078                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9079                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9080                 </links>
9081         </class>
9082
9083         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9084                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9085                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9086                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9087                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9088                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9089                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9090                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9091                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9092                 </fields>
9093                 <links>
9094                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9095                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9096                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9097                 </links>
9098         </class>
9099
9100         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9101                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9102                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9103                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9104                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9105                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9106                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9107                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9108                 </fields>
9109                 <links>
9110                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9111                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9112                 </links>
9113         </class>
9114
9115         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9116                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9117                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9118                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9119                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9120                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9121                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9122                 </fields>
9123                 <links>
9124                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9125                 </links>
9126         </class>
9127
9128         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9129                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9130                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9131                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9132                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9133                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9134                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9135                 </fields>
9136                 <links>
9137                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9138                 </links>
9139         </class>
9140
9141         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9142                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9143                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9144                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9145                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9146                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9147                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9148                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9149                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9150                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9151                 </fields>
9152                 <links>
9153                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9154                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9155                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9156                 </links>
9157         </class>
9158
9159         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9160                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9161                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9162                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9163                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9164                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9165                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9166                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9167                 </fields>
9168                 <links>
9169                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9170                 </links>
9171         </class>
9172
9173         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9174                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9175                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9176                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9177                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9178                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9179                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9180                 </fields>
9181                 <links>
9182                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9183                 </links>
9184         </class>
9185
9186         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9187                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9188                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9189                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9190                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9191                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9192                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9193                 </fields>
9194                 <links>
9195                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9196                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9197                 </links>
9198         </class>
9199
9200         <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">
9201                 <fields oils_persist:primary="id">
9202                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9203                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9204                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9205                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9206                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9207                 </fields>
9208                 <links>
9209                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9210                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9211                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9212                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9213                 </links>
9214         </class>
9215
9216         <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">
9217                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9218                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9219                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9220                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9221                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9222                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9223                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9224                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9225                 </fields>
9226                 <links/>
9227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9228                         <actions>
9229                                 <retrieve/>
9230                         </actions>
9231                 </permacrud>
9232         </class>
9233
9234         <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">
9235                 <fields oils_persist:primary="ptype_key">
9236                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9237                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9238                 </fields>
9239                 <links/>
9240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9241                         <actions>
9242                                 <retrieve/>
9243                         </actions>
9244                 </permacrud>
9245         </class>
9246
9247         <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">
9248                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9249                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9250                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9251                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9252                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9253                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9254                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9255                 </fields>
9256                 <links>
9257                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9258                 </links>
9259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9260                         <actions>
9261                                 <retrieve/>
9262                         </actions>
9263                 </permacrud>
9264         </class>
9265
9266         <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">
9267                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9268                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9269                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9270                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9271                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9272                 </fields>
9273                 <links>
9274                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9275                 </links>
9276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9277                         <actions>
9278                                 <retrieve/>
9279                         </actions>
9280                 </permacrud>
9281         </class>
9282
9283         <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">
9284                 <fields oils_persist:primary="code">
9285                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9286                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9287                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9288                 </fields>
9289                 <links/>
9290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9291                         <actions>
9292                                 <retrieve/>
9293                         </actions>
9294                 </permacrud>
9295         </class>
9296
9297         <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">
9298                 <oils_persist:source_definition>
9299
9300             SELECT  b.id,
9301                     MAX(dcp.edit_date) AS last_delete_date
9302              FROM   biblio.record_entry b
9303                     JOIN asset.call_number cn ON (cn.record = b.id)
9304                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9305              WHERE  NOT b.deleted
9306              GROUP BY b.id
9307              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9308
9309                 </oils_persist:source_definition>
9310                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9311                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9312                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9313                 </fields>
9314                 <links>
9315                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9316                 </links>
9317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9318                         <actions>
9319                                 <retrieve/>
9320                         </actions>
9321                 </permacrud>
9322         </class>
9323
9324         <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">
9325                 <oils_persist:source_definition>
9326
9327             -- -- 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.
9328             -- -- 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
9329             -- -- may not.
9330             -- SELECT
9331             --     bre.id AS "bib_id",
9332             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9333             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9334             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9335             -- FROM (
9336                 SELECT
9337                     y.bre AS "id",
9338                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9339                     y.hold_count AS "hold_count",
9340                     (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"
9341                 FROM (
9342                         SELECT
9343                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9344                             COUNT(*) AS "hold_count"
9345                         FROM action.hold_request h
9346                         WHERE
9347                             cancel_time IS NULL
9348                             AND fulfillment_time IS NULL
9349                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9350                         GROUP BY 1
9351                     )y LEFT JOIN (
9352                         SELECT 
9353                             (SELECT id
9354                                 FROM biblio.record_entry 
9355                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9356                             ) AS "bre", 
9357                             COUNT(*) AS "copy_count"
9358                         FROM asset.copy
9359                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9360                         WHERE copy.holdable 
9361                             AND NOT copy.deleted 
9362                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9363                         GROUP BY 1
9364                     )x ON x.bre = y.bre
9365                 -- )z RIGHT JOIN (
9366                 --     SELECT id
9367                 --     FROM biblio.record_entry
9368                 --     WHERE NOT deleted
9369                 -- )bre ON (z.bib_id = bre.id)
9370                 
9371
9372                 </oils_persist:source_definition>
9373                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9374                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9375                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9376                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9377                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9378                 </fields>
9379                 <links>
9380                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9381                 </links>
9382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9383                         <actions>
9384                                 <retrieve/>
9385                         </actions>
9386                 </permacrud>
9387         </class>
9388
9389         <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">
9390                 <oils_persist:source_definition>
9391             SELECT *,
9392                 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,
9393                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9394             FROM
9395                 (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
9396                     FROM
9397                         action.hold_request ahr
9398                         JOIN reporter.hold_request_record rhrr USING (id)
9399                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9400                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9401                     WHERE
9402                         ahr.cancel_time IS NULL
9403                         AND ahr.fulfillment_time IS NULL
9404                     GROUP BY bib_record, pickup_lib
9405                 )x
9406                 JOIN
9407                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9408                     FROM
9409                         action.hold_request ahr
9410                         JOIN reporter.hold_request_record rhrr USING (id)
9411                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9412                     WHERE
9413                         ahr.cancel_time IS NULL
9414                         AND ahr.fulfillment_time IS NULL
9415                     GROUP BY bib_record
9416                 )y
9417                 USING (id)
9418                 </oils_persist:source_definition>
9419                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9420                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9421                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9422                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9423                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9424                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9425                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9426                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9427                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9428                 </fields>
9429                 <links>
9430                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9431                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9432                 </links>
9433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9434                         <actions>
9435                                 <retrieve/>
9436                         </actions>
9437                 </permacrud>
9438         </class>
9439
9440         <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">
9441                 <oils_persist:source_definition>
9442             SELECT
9443                 ac.id,
9444                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9445                 MAX(actac.xact_start) AS last_circ
9446             FROM asset.copy ac
9447                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9448             GROUP BY ac.id
9449
9450             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9451             --SELECT
9452             --    ac.id,
9453             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9454             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9455             --FROM asset.copy ac
9456             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9457             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9458             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9459                 </oils_persist:source_definition>
9460                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9461                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9462                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9463                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9464                 </fields>
9465                 <links>
9466                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9467                 </links>
9468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9469                         <actions>
9470                                 <retrieve/>
9471                         </actions>
9472                 </permacrud>
9473         </class>
9474
9475         <!-- ********************************************************************************************************************* -->
9476         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9477         <!-- ********************************************************************************************************************* -->
9478         <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">
9479                 <fields oils_persist:primary="id">
9480                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9481                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9482                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9483                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9484                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9485                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9486                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9487                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9488                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9489                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9490                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9491                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9492                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9493                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9494                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9495                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9496                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9497                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9498                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9499                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9500                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9501                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9502                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9503                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9504                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9505                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9506                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9507                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9508                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9509                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9510                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9511                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9512                 </fields>
9513                 <links>
9514                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9515                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9516                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9517                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9518                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9519                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9520                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9521                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9522                 </links>
9523         </class>
9524
9525         <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">
9526                 <fields oils_persist:primary="id">
9527                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9528                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9529                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9530                 </fields>
9531                 <links>
9532                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9533                 </links>
9534         </class>
9535
9536         <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">
9537                 <fields oils_persist:primary="id">
9538                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9539                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9540                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9541                 </fields>
9542                 <links>
9543                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9544                 </links>
9545         </class>
9546
9547         <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">
9548                 <fields oils_persist:primary="id">
9549                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9550
9551                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9552                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9553                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9554
9555                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9556                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9557                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9558
9559                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9560                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9561
9562                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9563                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9564                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9565
9566                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9567                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9568
9569                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9570                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9571                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9572
9573                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9574                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9575                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9576
9577                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9578                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9579                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9580                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9581
9582                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9583                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9584
9585                 </fields>
9586                 <links>
9587                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9588                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9589                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9590                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9591                 </links>
9592         </class>
9593
9594         <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">
9595                 <oils_persist:source_definition>
9596
9597             SELECT
9598                 po.ordering_agency AS ordering_agency,
9599                 po.id AS purchase_order,
9600                 li.id AS lineitem,
9601                 lid.id AS lineitem_detail,
9602                 cpa.id AS claim_policy_action
9603             FROM
9604                 acq.lineitem_detail lid
9605                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9606                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9607                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9608                 JOIN acq.claim_policy_action cpa ON (
9609                     cpa.claim_policy = cp.id
9610
9611                     -- we only care about claim policy actions whose claim
9612                     -- interval we'd reached or exceeded
9613                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9614
9615                     -- filter out all claim policy actions where claim events
9616                     -- have occurred on or after the action's action_interval
9617                     AND NOT EXISTS (
9618                         SELECT 1
9619                         FROM
9620                             acq.claim_event evt
9621                             JOIN acq.claim claim ON (
9622                                 claim.id = evt.claim
9623                                 AND claim.lineitem_detail = lid.id
9624                             )
9625                         WHERE
9626                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9627                     )
9628                 )
9629             WHERE
9630                 lid.cancel_reason IS NULL
9631                 AND li.cancel_reason IS NULL -- belt/suspenders
9632                 AND po.cancel_reason IS NULL -- belt/suspenders
9633                 AND lid.recv_time IS NULL
9634                 AND po.state = 'on-order'
9635             ORDER BY 1, 2, 3, 4, 5
9636
9637                 </oils_persist:source_definition>
9638                 <fields>
9639                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9640                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9641                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9642                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9643                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9644                 </fields>
9645                 <links>
9646                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9647                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9648                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9649                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9650                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9651                 </links>
9652         </class>
9653         <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">
9654                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9655                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9656                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9657                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9658                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9659                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9660                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9661                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9662                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9663                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9664                 </fields>
9665                 <links>
9666                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9667                 </links>
9668     </class>
9669         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
9670                 <oils_persist:source_definition>
9671             SELECT * FROM acq.lineitem_summary 
9672                                 WHERE item_count > (invoice_count + cancel_count)
9673         </oils_persist:source_definition>
9674                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9675                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9676                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9677                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9678                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9679                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9680                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9681                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9682                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9683                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9684                 </fields>
9685                 <links>
9686                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9687                 </links>
9688     </class>
9689         <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">
9690                 <oils_persist:source_definition>
9691
9692                         SELECT  t.*
9693                           FROM  action.transit_copy t
9694                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9695                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9696                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9697
9698                 </oils_persist:source_definition>
9699                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9700                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9701                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9702                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9703                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9704                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9705                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9706                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9707                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9708                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9709                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9710                 </fields>
9711                 <links>
9712                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9713                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9714                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9715                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9716                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9717                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9718                 </links>
9719         </class>
9720
9721     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9722                 <oils_persist:source_definition>
9723
9724         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9725                 SELECT
9726                         cp.id as copy,
9727                         COUNT(circ.id),
9728                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9729                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9730                 FROM
9731                         asset.copy cp
9732                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9733                 GROUP BY 1, 3, 4
9734                 UNION
9735                 SELECT
9736                         cp.id as copy,
9737                         COUNT(circ.id),
9738                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9739                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9740                 FROM
9741                         asset.copy cp
9742                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9743                 GROUP BY 1, 3, 4
9744                 UNION
9745                 SELECT
9746                         id as copy,
9747                         circ_count,
9748                         -1 AS year,
9749                         false as is_renewal
9750                 FROM
9751                         extend_reporter.legacy_circ_count
9752         )x GROUP BY 1, 3, 4
9753
9754                 </oils_persist:source_definition>
9755         <fields>
9756             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9757             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9758             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9759             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9760         </fields>
9761                 <links>
9762                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9763                 </links>
9764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9765                         <actions>
9766                                 <retrieve/>
9767                         </actions>
9768                 </permacrud>
9769     </class>
9770
9771         <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">
9772                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9773                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9774                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9775                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9776                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9777                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9778                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9779                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9780                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9781                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9782                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9783                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9784                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9785                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9786                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9787                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9788                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9789                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9790                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9791                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9792                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9793                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9794                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9795                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9796                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9797                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9798                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9799                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9800                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9801                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9802                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9803                 </fields>
9804                 <links>
9805                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9806                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9807                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9808                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9809                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9810                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9811                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9812                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9813                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9814                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9815                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9816                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9817                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9818                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9819                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9820                 </links>
9821         </class>
9822
9823     <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">
9824         <fields oils_persist:primary="id">
9825             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9826             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9827             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9828             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9829             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9830             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9831             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9832             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9833             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9834             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9835             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9836             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9837             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9838             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9839             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9840             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9841             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9842             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9843             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9844             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9845             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9846             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9847             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9848             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9849             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9850             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9851             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9852             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9853             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9854             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9855             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9856             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9857             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9858             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9859         </fields>
9860         <links>
9861             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9862             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9863             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9864             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9865             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9866         </links>
9867     </class>
9868
9869     <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">
9870         <fields oils_persist:primary="id">
9871             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9872             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9873             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9874             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9875         </fields>
9876         <links>
9877             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9878             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9879         </links>
9880     </class>
9881
9882     <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">
9883         <fields oils_persist:primary="owning_lib">
9884             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9885             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9886             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9887         </fields>
9888         <links>
9889             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9890         </links>
9891     </class>
9892
9893     <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">
9894         <fields oils_persist:primary="id">
9895             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9896             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9897             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9898             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9899             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9900         </fields>
9901         <links>
9902             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9903             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9904             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9905         </links>
9906     </class>
9907
9908     <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">
9909         <fields oils_persist:primary="circ_lib">
9910             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9911             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9912             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9913             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9914         </fields>
9915         <links>
9916             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9917             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9918         </links>
9919     </class>
9920
9921     <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">
9922         <fields oils_persist:primary="id">
9923             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9924             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9925             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9926             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9927             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9928         </fields>
9929         <links>
9930             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9931             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9932             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9933         </links>
9934     </class>
9935
9936     <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">
9937         <fields oils_persist:primary="home_ou">
9938             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9939             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9940             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9941             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9942         </fields>
9943         <links>
9944             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9945             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9946         </links>
9947     </class>
9948         <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">
9949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9950                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9951                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9952                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9953                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9954                 </fields>
9955                 <links>
9956                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9957                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9958                 </links>
9959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9960                         <actions>
9961                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9962                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9963                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9964                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9965                         </actions>
9966                 </permacrud>
9967         </class>
9968         <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">
9969                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9970                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9971                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9972                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9973                 </fields>
9974                 <links>
9975                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9976                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9977                         </links>
9978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9979                 <actions>
9980                                 <create permission="ADMIN_ACQ_FUND_TAG">
9981                                         <context link="tag" field="owner"/>
9982                                 </create>
9983                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9984                                         <context link="tag" field="owner"/>
9985                                 </retrieve>
9986                                 <update permission="ADMIN_ACQ_FUND_TAG">
9987                                         <context link="tag" field="owner"/>
9988                                 </update>
9989                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9990                                         <context link="tag" field="owner"/>
9991                                 </delete>
9992                         </actions>
9993                 </permacrud>
9994         </class>
9995         <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">
9996                 <oils_persist:source_definition><![CDATA[
9997                 SELECT
9998                         poi.purchase_order AS purchase_order,
9999                         ii.invoice AS invoice,
10000                         NULL AS lineitem,
10001                         poi.id AS po_item,
10002                         NULL AS picklist
10003                 FROM
10004                         acq.po_item poi
10005                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10006                 UNION SELECT
10007                         jub.purchase_order AS purchase_order,
10008                         ie.invoice AS invoice,
10009                         jub.id AS lineitem,
10010                         NULL AS po_item,
10011                         jub.picklist AS picklist
10012                 FROM
10013                         acq.lineitem jub
10014                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10015                 UNION SELECT
10016                         ii.purchase_order AS purchase_order,
10017                         ii.invoice AS invoice,
10018                         NULL AS lineitem,
10019                         NULL AS po_item,
10020                         NULL AS picklist
10021                 FROM
10022                         acq.invoice_item ii
10023                 WHERE ii.po_item IS NULL
10024                 UNION SELECT
10025                         ie.purchase_order AS purchase_order,
10026                         ie.invoice AS invoice,
10027                         NULL AS lineitem,
10028                         NULL AS po_item,
10029                         NULL AS picklist
10030                 FROM
10031                         acq.invoice_entry ie
10032                 WHERE ie.lineitem IS NULL
10033                 UNION SELECT
10034                         NULL AS purchase_order,
10035                         NULL AS invoice,
10036                         jub.id AS lineitem,
10037                         NULL AS po_item,
10038                         jub.picklist AS picklist
10039                 FROM
10040                         acq.lineitem jub
10041                 WHERE jub.purchase_order IS NULL
10042                 ]]></oils_persist:source_definition>
10043                 <fields>
10044                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10045                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10046                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10047                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10048                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10049                 </fields>
10050                 <links>
10051                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10052                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10053                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10054                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10055                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10056                 </links>
10057         </class>
10058         <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">
10059                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10060                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10061                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10062                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10063                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10064                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10065                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10066                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10067                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10068                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10069                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10070                 </fields>
10071                 <links>
10072                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10073                 </links>
10074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10075                         <actions>
10076                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10077                                 <retrieve/>
10078                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10079                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10080                         </actions>
10081                 </permacrud>
10082         </class>
10083
10084         <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">
10085                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10086                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10087                         <field name="date_applied" reporter:datatype="timestamp"/>
10088                         <field name="org" reporter:datatype="org_unit"/>
10089                         <field name="original_value" reporter:datatype="text"/>
10090                         <field name="new_value" reporter:datatype="text"/>
10091                         <field name="field_name" reporter:datatype="link"/>
10092                 </fields>
10093                 <links>
10094                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10095                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10096                 </links>
10097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10098                         <actions>
10099                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10100                                 <retrieve/>
10101                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10102                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10103                         </actions>
10104                 </permacrud>
10105         </class>
10106         <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">
10107                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10109                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10110                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10111                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10112                 </fields>
10113                 <links>
10114                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10115                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10116                 </links>
10117         </class>
10118         <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">
10119                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10120                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10121                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10122                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10123                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10124                 </fields>
10125                 <links>
10126                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10127                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10128                 </links>
10129         </class>
10130
10131
10132         <!-- ********************************************************************************************************************* -->
10133
10134 </IDL>
10135
10136 <!--
10137     vim:noet:ts=4:sw=4:
10138 -->